-
-
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 7919903
Showing
9 changed files
with
247 additions
and
212 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,57 @@ | ||
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 ( | ||
<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> | ||
); | ||
} | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
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: { | ||
height: 140, | ||
}, | ||
}; | ||
|
||
function MediaCard(props) { | ||
const { classes } = props; | ||
return ( | ||
<Card className={classes.card}> | ||
<CardMedia | ||
className={classes.media} | ||
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> | ||
); | ||
} | ||
|
||
MediaCard.propTypes = { | ||
classes: PropTypes.object.isRequired, | ||
}; | ||
|
||
export default withStyles(styles)(MediaCard); |
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
Oops, something went wrong.