Files
Testing/websocket-chat-master/client/ChatroomPreview.jsx
sean 0e8a8b3028
Some checks are pending
deploy-testing / deploy (push) Waiting to run
Initial testing snapshot
2026-11-17 16:15:01 -05:00

37 lines
766 B
JavaScript

import React from 'react';
import styled from 'styled-components'
import Paper from 'material-ui/Paper';
import { Card, CardMedia, CardTitle } from 'material-ui/Card';
const Wrapper = styled.div`
cursor: pointer;
`
const getCardTitleStyle = () => ({
display: 'flex',
alignItems: 'center'
})
export default ({ chatroom, onEnter }) => (
<Paper
style={{ maxWidth: 600, marginBottom: 40 }}
zDepth={5}
>
<Wrapper onClick={onEnter}>
<Card>
<CardMedia
overlay={
<CardTitle
title={chatroom.name}
style={getCardTitleStyle()}
/>
}
>
<img height="100%" src={chatroom.image} alt="" />
</CardMedia>
</Card>
</Wrapper>
</Paper>
)