UNPKG

goobs-frontend

Version:

A comprehensive React-based libary for building modern web applications

41 lines 1.54 kB
import { default as React } from 'react'; import { FieldStyleOverrides } from '../../Shell'; export interface SelectOption { value: string; _id?: string; } export interface MultiSelectChipProps { label?: React.ReactNode; options?: SelectOption[]; /** * Controlled list of selected ids (or values when no `_id` is set). * Pair with `onChange` for fully-controlled mode. */ value?: string[]; /** Uncontrolled initial selection. Ignored when `value` is provided. */ defaultSelected?: string[]; onChange?: (values: string[]) => void; onFocus?: (event: React.FocusEvent<HTMLDivElement>) => void; helperText?: string; /** Error message rendered below the trigger; sets aria-invalid. */ error?: string | boolean; /** Stable test selector — emitted as `data-field` on the wrapper. */ dataField?: string; /** Stable test selector — emitted as `data-field-name` on the wrapper. */ dataFieldName?: string; /** * Entity field key. Emitted as `data-field-name` (unless `dataFieldName` * is set explicitly) so a single `name="<entityFieldKey>"` gives the stable * test anchor the recommender targets via `[data-field-name="<key>"]`. */ name?: string; styles?: FieldStyleOverrides & { arrowRight?: string; arrowTop?: string; arrowPadding?: string; arrowBottom?: string; }; } declare const MultiSelectChip: React.FC<MultiSelectChipProps>; export default MultiSelectChip; //# sourceMappingURL=index.d.ts.map