UNPKG

@snups/rjsf-mantine

Version:

Mantine theme, fields and widgets for react-jsonschema-form

20 lines 934 B
import { jsx as _jsx } from "react/jsx-runtime"; import { Container, Grid } from '@mantine/core'; /** Renders a `GridTemplate` for mantine, which is expecting the column sizing information coming in via the * extra props provided by the caller, which are spread directly on the `Grid`/`Grid.Col`. * * @param props - The GridTemplateProps, including the extra props containing the Mantine grid positioning details */ export default function GridTemplate(props) { const { children, column, fluid = true, ...rest } = props; if (column) { return _jsx(Grid.Col, { ...rest, children: children }); } // Grid with fluid container if (fluid) { return (_jsx(Container, { p: '4', mx: 0, w: '100%', children: _jsx(Grid, { ...rest, children: children }) })); } // Grid without container return (_jsx(Grid, { grow: true, ...rest, children: children })); } //# sourceMappingURL=GridTemplate.js.map