-
-
Save jeremeylduvall/2c30fde21334e4e12d317461f56dc1c7 to your computer and use it in GitHub Desktop.
Row.js
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
// External | |
import React from 'react'; | |
import PropTypes from 'prop-types'; | |
// Internal | |
import Photo from './photo'; | |
const PhotoRow = ( props ) => { | |
return ( | |
<div | |
style={ { | |
display: 'flex', | |
flexDirection: 'row', | |
width: '100%', | |
} } | |
> | |
{ | |
props.photos.map( photo => { | |
return ( | |
<Photo | |
src={ photo.node.featured_media.localFile.childImageSharp.sizes.src } | |
sizes={ photo.node.featured_media.localFile.childImageSharp.sizes } | |
key={ photo.node.id } | |
link={ photo.node.date + photo.node.slug } | |
/> | |
) | |
} ) | |
} | |
</div> | |
) | |
} | |
PhotoRow.PropTypes = { | |
photos: PropTypes.array, | |
} | |
export default PhotoRow; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment