UNPKG

@navinc/base-react-components

Version:
33 lines (32 loc) 1.17 kB
import { InferComponentProps } from './types.js'; import { ChangeEvent } from 'react'; declare const SelectField: import("styled-components").StyledComponent<"input", import("styled-components").DefaultTheme, { isInvalid?: boolean | undefined; } & { as: string; }, "as">; type OptionObject = { label: string; value: string; disabled?: boolean; }; type Option = string | OptionObject; type SelectProps = Omit<InferComponentProps<typeof SelectField>, 'onChange'> & { label?: string; hasSpaceForErrors?: boolean; helperText?: string; isInvalid?: boolean; options?: Option[]; value?: string; required?: boolean; errors?: Array<string>; lede?: string; onChange?: (event: ChangeEvent<HTMLSelectElement>) => void; placeholder?: string; isPrivate?: boolean; }; export declare const Select: import("styled-components").StyledComponent<{ ({ className, label, hasSpaceForErrors, helperText, isInvalid, options, value, required, errors, lede, onChange, placeholder, isPrivate, ...props }: SelectProps): JSX.Element; displayName: string; }, import("styled-components").DefaultTheme, {}, never>; export {};