Created
November 12, 2018 17:46
-
-
Save urielhdz/2d61d5c7a2f0169a5a21d31e5e1ea55f to your computer and use it in GitHub Desktop.
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
import React from 'react'; | |
import Card from '@material-ui/core/Card'; | |
import CardContent from '@material-ui/core/CardContent'; | |
import CardMedia from '@material-ui/core/CardMedia'; | |
import Typography from '@material-ui/core/Typography'; | |
import { withStyles } from '@material-ui/core/styles'; | |
function AlbumCard(props){ | |
return( | |
<Card> | |
<CardMedia className={props.classes.media} image={props.album.coverPhotoBaseUrl} /> | |
<CardContent> | |
<Typography variant="h5" component="h2" glutterbottom="true">{props.album.title}</Typography> | |
<Typography component="p">{props.album.mediaItemsCount} foto(s)</Typography> | |
</CardContent> | |
</Card> | |
); | |
} | |
export default withStyles({ | |
media:{ | |
minHeight: '200px' | |
} | |
})(AlbumCard); |
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
import React from 'react'; | |
import { withStyles } from '@material-ui/core/styles'; | |
import AlbumCard from './AlbumCard'; | |
function AlbumsList(props){ | |
return( | |
{ | |
props.albums.map((album,index)=>{ | |
return( | |
<AlbumCard setAlbum={props.setAlbum} album={album} /> | |
) | |
}) | |
} | |
); | |
} | |
export default withStyles({})(AlbumsList); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment