UNPKG

@gpa-gemstone/react-interactive

Version:
55 lines (54 loc) 1.41 kB
/** * Represents the structure of a button used within the application. */ interface IButton { /** * Text label that appears on the button */ Label: JSX.Element | string; /** * Callback function for when a button is clicked * @returns */ Callback: () => void; /** * Optional group number for grouping items visually with dividers */ Group?: number; /** * Optional flag to disable button */ Disabled?: boolean; /** * Optional content to render inside tooltip */ ToolTipContent?: JSX.Element; /** * Optional flag to render tooltip on button */ ShowToolTip?: boolean; /** * Optional location of tooltip, defaulting to top */ ToolTipLocation?: ('top' | 'bottom' | 'left' | 'right'); /** * Optional key to be used on the fragment that is parent of the dropdown option. */ Key?: string | number; } /** * Represents the properties for a component that renders buttons. */ interface IProps { Label: JSX.Element | string; Callback: () => void; Disabled?: boolean; Options: IButton[]; Size?: 'sm' | 'lg' | 'xlg'; BtnClass?: string; TooltipContent?: JSX.Element; TooltipLocation?: ('top' | 'bottom' | 'left' | 'right'); ShowToolTip?: boolean; } declare const BtnDropdown: (props: IProps) => JSX.Element; export default BtnDropdown;