-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
386b290
commit 04bf6a6
Showing
5 changed files
with
78 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { withStyles } from '@material-ui/core/styles'; | ||
import Card from '@material-ui/core/Card'; | ||
import CardActions from '@material-ui/core/CardActions'; | ||
import CardContent from '@material-ui/core/CardContent'; | ||
import CardMedia from '@material-ui/core/CardMedia'; | ||
import Button from '@material-ui/core/Button'; | ||
import Typography from '@material-ui/core/Typography'; | ||
|
||
const styles = { | ||
card: { | ||
maxWidth: 345, | ||
}, | ||
media: { | ||
// ⚠️ object-fit is not supported by IE11. | ||
objectFit: 'cover', | ||
}, | ||
}; | ||
|
||
function ImgMediaCard(props) { | ||
const { classes } = props; | ||
return ( | ||
<div> | ||
<Card className={classes.card}> | ||
<CardMedia | ||
component="img" | ||
className={classes.media} | ||
height="140" | ||
image="/static/images/cards/contemplative-reptile.jpg" | ||
title="Contemplative Reptile" | ||
/> | ||
<CardContent> | ||
<Typography gutterBottom variant="headline" component="h2"> | ||
Lizard | ||
</Typography> | ||
<Typography component="p"> | ||
Lizards are a widespread group of squamate reptiles, with over 6,000 species, ranging | ||
across all continents except Antarctica | ||
</Typography> | ||
</CardContent> | ||
<CardActions> | ||
<Button size="small" color="primary"> | ||
Share | ||
</Button> | ||
<Button size="small" color="primary"> | ||
Learn More | ||
</Button> | ||
</CardActions> | ||
</Card> | ||
</div> | ||
); | ||
} | ||
|
||
ImgMediaCard.propTypes = { | ||
classes: PropTypes.object.isRequired, | ||
}; | ||
|
||
export default withStyles(styles)(ImgMediaCard); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters