import * as React from 'react'import { Grid } from '@welcome-ui/grid'import { Box } from '@welcome-ui/box'const Example = () => {return (<Grid gap="md" templateColumns="repeat(5, 1fr)"><Box backgroundColor="sub-1" h={50} w="100%" /><Box backgroundColor="sub-3" h={50} w="100%" /><Box backgroundColor="sub-4" h={50} w="100%" /><Box backgroundColor="sub-5" h={50} w="100%" /><Box backgroundColor="sub-2" h={50} w="100%" /></Grid>)}export default Example
Installation
1
Run the following command:
yarn add @welcome-ui/grid
2
Import component:
import { Grid } from '@welcome-ui/grid'
With the Grid component use shorthand props:
gridArea
isarea
gridAutoColumns
isautoColumns
gridAutoFlow
isautoFlow
gridAutoRows
isautoRows
gridColumn
iscolumn
columnGap
iscolumnGap
gridGap
isgap
gridRow
isrow
GridRowGap
isrowGap
gridTemplateAreas
istemplateAreas
gridTemplateColumns
istemplateColumns
gridTemplateRows
istemplateRows
Grid Item
With the Grid.Item component use shorthand props:
gridArea
isarea
gridColumn
iscolumn
gridRow
isrow