Created
November 6, 2020 16:10
-
-
Save Marwil96/ac19f17df8acdafb368f6dcae11d9ee7 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 styled from 'styled-components'; | |
const GridWrapper = styled.section` | |
display: grid; | |
grid-template-columns: ${props => `repeat(${props.columns}, 1fr)`}; | |
` | |
const Grid = ({columns, children, style}) => { | |
return ( | |
<GridWrapper columns={columns} style={style}> | |
{children} | |
</GridWrapper> | |
) | |
} | |
export default Grid; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment