import React from 'react'; import PropTypes from 'prop-types'; import { withStyles } from '@material-ui/core/styles'; import PlayArrowIcon from '@material-ui/icons/PlayArrow'; import MoreVertIcon from '@material-ui/icons/MoreVert'; import { red } from '@material-ui/core/colors'; import { Card, CardHeader, CardMedia, IconButton, Avatar } from '@material-ui/core'; const styles = theme => ({ playIcon: { height: 38, width: 38, }, cardSocmed: { maxWidth: 400, }, media: { height: 0, paddingTop: '56.25%', // 16:9 position: 'relative', }, avatar: { backgroundColor: red[500], }, playBtn: { position: 'absolute', top: '50%', left: '50%', width: 64, height: 64, transform: 'translate(-50%, -50%)', '& svg': { color: theme.palette.common.white, fontSize: 64 } } }); class VideoCard extends React.Component { state = { expanded: false }; handleExpandClick = () => { this.setState({ expanded: !this.state.expanded }); }; render() { const { classes, title, cover, date } = this.props; return ( R )} action={( )} title={title} subheader={date} /> ); } } VideoCard.propTypes = { classes: PropTypes.object.isRequired, title: PropTypes.string.isRequired, cover: PropTypes.string.isRequired, date: PropTypes.string.isRequired, }; export default withStyles(styles)(VideoCard);