@rocketsofawesome/mirage
Version:
[Live Demo of the Pattern Library](https://rocketsofawesome.github.io/mirage/)
30 lines (26 loc) • 578 B
JavaScript
import React from 'react'
import PropTypes from 'prop-types'
import { ContentfulRenderer } from 'SRC'
const ContentfulLandingPage = ({
className,
fields: {
section
},
sys,
...props
}) => {
return (
<section style={{ overflow: 'hidden' }}>
{section.map((element, index) => {
return (<ContentfulRenderer key={index} {...element} {...props} />)
})}
</section>
)
}
ContentfulLandingPage.propTypes = {
className: PropTypes.string,
fields: PropTypes.shape({
section: PropTypes.array
})
}
export default ContentfulLandingPage