import React from 'react'; import PropTypes from 'prop-types'; import { ComponentProps } from '../utils/types'; type OptionClickHandler = (event: React.MouseEvent | React.KeyboardEvent, data: { label?: string; value: any; }) => void; type OnKeyDownHandler = (event: React.KeyboardEvent, data: { label?: string; value: any; }) => void; type OnChangeHandler = (event: React.KeyboardEvent | React.MouseEvent, data: { label?: string; value: any; }) => void; interface OptionPropsBase { /** Add a disabled attribute and prevent clicking. */ disabled?: boolean; /** Adornment after the label. */ endAdornment?: React.ReactNode; /** The text shown on the button. */ label?: string; role?: 'radio' | 'menuitemradio'; /** Adornment in front of the label. */ startAdornment?: React.ReactNode; /** @private Set by `RadioBar`. */ selected?: boolean; /** The value of the `Option`. */ value: any; } type OptionProps = ComponentProps; declare function Option({ disabled: disabledProp, label, selected, startAdornment, endAdornment, value, role, ...otherProps }: OptionProps): React.JSX.Element; declare namespace Option { var propTypes: { disabled: PropTypes.Requireable; startAdornment: PropTypes.Requireable; endAdornment: PropTypes.Requireable; label: PropTypes.Requireable; /** @private Set by `RadioBar`. */ role: PropTypes.Requireable; /** @private Set by `RadioBar`. */ selected: PropTypes.Requireable; /** The value of the `Option`. */ value: PropTypes.Validator; }; } export default Option; export { OptionClickHandler, OnKeyDownHandler, OnChangeHandler };