Created
March 2, 2019 14:59
-
-
Save kamleshchandnani/e4e4b63702a0c46e28d10e4ce69323ca 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 PropTypes from 'prop-types'; | |
import { Helmet } from 'react-helmet'; | |
import GalleryContainer from './GalleryContainer'; | |
const ampCarousel = [{ | |
async: '', | |
'custom-element': 'amp-carousel', | |
src: 'https://cdn.ampproject.org/v0/amp-carousel-0.1.js', | |
}]; | |
const Gallery = (props) => { | |
const { | |
width, | |
height, | |
type, | |
children, | |
} = props; | |
return ( | |
<React.Fragment> | |
<Helmet script={ampCarousel} /> | |
<GalleryContainer | |
width={width} | |
height={height} | |
type={type} | |
> | |
{children} | |
</GalleryContainer> | |
</React.Fragment> | |
); | |
}; | |
Gallery.propTypes = { | |
width: PropTypes.string, | |
height: PropTypes.string, | |
type: PropTypes.oneOf(['carousel', 'slides']).isRequired, | |
children: PropTypes.node, | |
}; | |
export default Gallery; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment