UNPKG

@open-formulieren/formio-builder

Version:

An opinionated Formio webform builder for Open Forms

28 lines (27 loc) 1.08 kB
import { Option } from '@open-formulieren/types'; import { PathsForValueType } from '../../../types'; export interface ValuesTableProps<S> { /** * Name of the field holding the (component) values, e.g. `values` or `data.values`. */ name: PathsForValueType<S, Option[]> & string; withOptionDescription?: boolean; } /** * Manage a set of option values/labels for a component. * * Formio typically allows you to specify manual options/values for preset options, * like the dropdown for a select, the values + labels for a radio choice or multiple * checkboxes. * * This component is a generic component, you must use it by passing the relevant * concrete schema for `name` prop autocomplete and type checking, e.g.: * * * <ValuesTable<SelectComponentSchema> name="data.values" /> * * Translations for every option label are (to be) managed in a dedicated translations * component. */ declare function ValuesTable<S>({ name, withOptionDescription }: ValuesTableProps<S>): import("react/jsx-runtime").JSX.Element; export default ValuesTable;