import Field from './Field'; import { FieldProps, UiOptionsGrid } from './types'; interface LayoutGridProps extends FieldProps { grid: UiOptionsGrid['grid']; } export const LayoutGrid = ({ grid, name, schema }: LayoutGridProps) => { const { properties } = schema; if (!properties || !grid) return null; return ( <> {grid.map((lines, lindex) => (
{lines.map((rows, rindex) => (
{rows.map( (field, index) => !!properties[field] && (
) )}
))}
))} ); }; export default LayoutGrid;