/** @jsx jsx */ /** @jsxFrag React.Fragment */ import { type Spec } from 'immutability-helper'; import { jsx } from '@emotion/react'; import React from 'react'; export declare type ColumnInfo = { [K in keyof T]: { title: string; width: number; CellRenderer: (props: { val: T[K]; onChange?: (spec: Spec) => void; item: T; itemIndex: number; }) => JSX.Element; }; }; interface ItemTableProps { items: readonly T[]; /** Singular item label, lowercase. */ itemLabel: string; /** Plural item label, lowercase. */ itemLabelPlural?: string; /** Same as for BP’s FormGroup. */ helperText?: React.ReactNode; /** Same as for BP’s FormGroup. */ subLabel?: React.ReactNode; /** Required for being able to either remove, edit or create new items. */ onChangeItems?: (spec: Spec>) => void; maxItems?: number; minItems?: number; /** * Required for being able to create new items * and for calculating things like column numbers. */ placeholderItem: T | (() => T); columnInfo: ColumnInfo; rowHeight?: number; } export declare function ItemTable({ items, itemLabel, itemLabelPlural, helperText, subLabel, onChangeItems, placeholderItem, columnInfo, rowHeight, maxItems, minItems, }: ItemTableProps): jsx.JSX.Element; export default ItemTable;