UNPKG

@wonderflow/react-components

Version:

UI components from Wonderflow's Wanda design system

79 lines 2.61 kB
import { ChangeEvent, ReactNode, SelectHTMLAttributes } from 'react'; import { SymbolProps } from '../..'; export declare type SelectProps = SelectHTMLAttributes<HTMLSelectElement> & { /** * Pass the children `option` elements. This is required. */ children: ReactNode; /** * Change the default icon displayed on the side of the select. */ icon?: SymbolProps['source']; /** * Set the accessible label for the select. */ label?: ReactNode; /** * Optional hint text field, it provides additional help or context to the user. */ message?: string; /** * Set how many options can be selected at once. */ kind?: 'single' | 'multiple'; /** * Set the size of the select. This affects alsosize and style of the icon. */ dimension?: 'regular' | 'small' | 'big'; /** * Set disabled state. The select is not interactive and grayed out. */ disabled?: boolean; /** * Set the invalid state. */ invalid?: boolean; /** * Callback function to be called when a new value is selected. */ onChange?: (event: ChangeEvent<HTMLSelectElement>) => void; }; export declare const Select: import("react").ForwardRefExoticComponent<SelectHTMLAttributes<HTMLSelectElement> & { /** * Pass the children `option` elements. This is required. */ children: ReactNode; /** * Change the default icon displayed on the side of the select. */ icon?: import("packages/symbols/dist").SymbolNames | import("react").ReactElement<HTMLOrSVGElement, string | import("react").JSXElementConstructor<any>> | undefined; /** * Set the accessible label for the select. */ label?: ReactNode; /** * Optional hint text field, it provides additional help or context to the user. */ message?: string | undefined; /** * Set how many options can be selected at once. */ kind?: "multiple" | "single" | undefined; /** * Set the size of the select. This affects alsosize and style of the icon. */ dimension?: "small" | "regular" | "big" | undefined; /** * Set disabled state. The select is not interactive and grayed out. */ disabled?: boolean | undefined; /** * Set the invalid state. */ invalid?: boolean | undefined; /** * Callback function to be called when a new value is selected. */ onChange?: ((event: ChangeEvent<HTMLSelectElement>) => void) | undefined; } & import("react").RefAttributes<HTMLSelectElement>>; //# sourceMappingURL=select.d.ts.map