UNPKG

@workday/canvas-kit-preview-react

Version:

Canvas Kit Preview is made up of components that have the full design and a11y review, are part of the DS ecosystem and are approved for use in product. The API's could be subject to change, but not without strong communication and migration strategies.

31 lines 1.77 kB
import { ErrorType } from '@workday/canvas-kit-react/common'; import { CoreSelectBaseProps, Option } from './SelectBase'; /** * @deprecated ⚠️ `SelectProps` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead. */ export interface SelectProps extends CoreSelectBaseProps { /** * The options of the Select. `options` may be an array of objects, an array of strings, * or an array that contains both objects and strings. * * If `options` includes objects, each included object must adhere to the `Option` interface: * * * `data: object` (optional) * * `disabled: boolean` (optional) * * `id: string` (optional, a random `id` will be assigned to the object if one isn't provided) * * `label: string` (optional, analogous to the text content of an `<option>`) * * `value: string` (required, analogous to the `value` attribute of an `<option>`) * * If `label` is omitted, the `value` will be used to render the option. * * The `data` object is carried over to the `option` passed into the `renderOption` function where it may then be used to customize how each option is rendered. */ options: (Option | string)[]; } /** * @deprecated ⚠️ `Select` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead. */ export declare const Select: import("@workday/canvas-kit-react/common").ElementComponent<"button", SelectProps> & { ErrorType: typeof ErrorType; }; //# sourceMappingURL=Select.d.ts.map