Skip to content

Instantly share code, notes, and snippets.

@jsmanifest
Created June 29, 2019 19:26
Show Gist options
  • Save jsmanifest/e8c624c055ddb4e750bf79118c040a3f to your computer and use it in GitHub Desktop.
Save jsmanifest/e8c624c055ddb4e750bf79118c040a3f to your computer and use it in GitHub Desktop.
const SectionContainer = ({
bgProps,
sectionProps,
children,
gridContainerProps,
gridColumnLeftProps,
gridColumnRightProps,
columnLeft,
columnRight,
}) => (
<Background {...bgProps}>
<Section {...sectionProps}>
{children || (
<Grid spacing={16} container {...gridContainerProps}>
<Grid xs={12} sm={6} item {...gridColumnLeftProps}>
{columnLeft}
</Grid>
<Grid xs={12} sm={6} item {...gridColumnRightProps}>
{columnRight}
</Grid>
</Grid>
)}
</Section>
</Background>
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment