Skip to content

LayoutComponents ​

Your component for each layout type a definition's layout uses: { section: Card, row: Grid }. A definition without sections or rows needs none.

ts
interface LayoutComponents {
  section?: ComponentType<SectionProps>
  row?: ComponentType<RowProps>
}

Explanation ​

See layout components.

SectionProps ​

  • SectionProps
    • section JsonLayoutSection: the section as written
    • children ReactNode: the section's items

RowProps ​

  • RowProps
    • row JsonLayoutRow: the row as written
    • spans number[]: how many of the 12 columns each cell takes
    • children (index: number) => ReactNode: renders the cell at index

Types ​