import { default as React, ChangeEventHandler } from 'react'; import { IconName } from '../Icon'; type CommonProps = { /** * The name of the OptionGroup */ name: string; /** * The current value */ value: K | null; /** * Options contained within the OptionGroup * * * If the key iconName is provided then the associated icon will be displayed * instead of the label (and in this case the label will be used * as an accessible attribute to describe the icon) */ options: { label: string; value: K; iconName?: IconName; }[]; /** * className for the element */ className?: string; /** * Whether the OptionGroup is invalid. */ isInvalid?: boolean; }; /** * `onChange` props is required only if `isDisabled` is false * `isDisabled` props is optional (will default to false) if `onChange` is given */ type DisabledProps = { /** * Handler that is called when the value changes. */ onChange: ChangeEventHandler; /** * Whether the OptionGroup should be disabled. * @default false */ isDisabled?: false; } | { onChange?: ChangeEventHandler; isDisabled: true; }; export type OptionGroupProps = CommonProps & DisabledProps; export declare const OptionGroup: ({ value, options, name, onChange, isDisabled, className, isInvalid, ...rest }: OptionGroupProps) => React.JSX.Element; export {}; //# sourceMappingURL=OptionGroup.d.ts.map