Files
Mohamed Achaq fca1071941 Adding Typescript and Mantine example (#36294)
## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`
2022-04-27 12:36:04 +00:00

29 lines
571 B
TypeScript

import { Box } from '@mantine/core'
import { ReactNode } from 'react'
type Props = {
children: ReactNode
}
const Grid = (props: Props) => {
return (
<Box
sx={{
display: 'grid',
gridTemplateColumns: 'repeat(2, minmax(200px, 1fr))',
gridGap: '1rem',
justifyContent: 'center',
alignItems: 'center',
'@media (max-width: 800px)': {
gridTemplateColumns: 'repeat(1, minmax(200px, 1fr))',
gridGap: '0.2rem',
},
}}
>
{props.children}
</Box>
)
}
export default Grid