import React from 'react'; import { BaseInputPropsWithoutChildren } from '../Input/BaseInput'; import { OptionListOption } from '../OptionList/OptionList'; import { CreateProps } from '../../types/utils/CreateProps'; declare type OptionListOptionWithSecondaryLabel = OptionListOption & { secondaryLabel?: string; }; declare type DropdownProps = CreateProps<{ /** Label shown on the dropdown */ label?: string; /** List of options */ options: OptionListOption[]; /** Selected option */ selectedOption?: OptionListOptionWithSecondaryLabel; /** OnChange handler when user makes selection. Return value is the selected option as an object and native event */ onChange: (event: React.SyntheticEvent, option: OptionListOption) => void; /** Error text is shown if dropdown is not open and will disappear when user opens the dropdown */ errorText?: string; /** Additional description for input, if label is not enough */ helperText?: string; /** Placeholder is visible when the dropdown is empty */ placeholder?: string; /** Sets the dropdown to disabled state. Dropdown is not clickable nor focusable */ disabled?: boolean; /** Adds the required mark on the dropdown label */ required?: boolean; /** Custom id */ id?: string; /** Custom name */ name?: string; /** Custom className */ className?: string; /** Optional property to specify placeholder text displayed in the search input field */ searchPlaceholder?: string; }, BaseInputPropsWithoutChildren, 'readonly' | 'iconName' | 'iconColor' | 'tabIndex' | 'onClick' | 'ref' | 'borderRadius' | 'onChange' | 'confirmed' | 'wrapperTabIndex' | 'value' | 'inputTabIndex'>; declare const Dropdown: React.FunctionComponent; export default Dropdown;