1 | {"version":3,"file":"ButtonGridCell.types.js","sourceRoot":"../src/","sources":["utilities/ButtonGrid/ButtonGridCell.types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport type { IButtonClassNames } from '../../components/Button/BaseButton.classNames';\nimport type { ITheme } from '../../Styling';\n\nexport interface IButtonGridCellProps<T> {\n /**\n * The option that will be made available to the user\n */\n item: T;\n\n /**\n * Arbitrary unique string associated with this option\n */\n id: string;\n\n /**\n * If the this option should be disabled\n */\n disabled?: boolean;\n\n /**\n * If the cell is currently selected\n */\n selected?: boolean;\n\n onClick?: (item: T, event?: React.MouseEvent<HTMLButtonElement>) => void;\n\n /**\n * The render callback to handle rendering the item\n */\n onRenderItem: (item: T) => JSX.Element;\n\n onHover?: (item?: T, event?: React.MouseEvent<HTMLButtonElement>) => void;\n\n onFocus?: (item: T, event?: React.FocusEvent<HTMLButtonElement>) => void;\n\n /**\n * The accessible role for this option\n */\n role?: string;\n\n /**\n * className(s) to apply\n */\n className?: string;\n\n /**\n * CSS classes to apply when the cell is disabled\n */\n cellDisabledStyle?: string[];\n\n /**\n * CSS classes to apply when the cell is selected\n */\n cellIsSelectedStyle?: string[];\n\n /**\n * Index for this option\n */\n index?: number;\n\n /**\n * The label for this item.\n */\n label?: string;\n\n /**\n * Method to provide the classnames to style a button.\n * The default value for this prop is `getClassnames` defined in `BaseButton.classNames`.\n */\n getClassNames?: (\n theme: ITheme,\n className: string,\n variantClassName: string,\n iconClassName: string | undefined,\n menuIconClassName: string | undefined,\n disabled: boolean,\n checked: boolean,\n expanded: boolean,\n isSplit: boolean | undefined,\n ) => IButtonClassNames;\n\n onMouseEnter?: (ev: React.MouseEvent<HTMLButtonElement>) => boolean;\n\n onMouseMove?: (ev: React.MouseEvent<HTMLButtonElement>) => boolean;\n\n onMouseLeave?: (ev: React.MouseEvent<HTMLButtonElement>) => void;\n\n onWheel?: (ev: React.MouseEvent<HTMLButtonElement>) => void;\n\n onKeyDown?: (ev: React.KeyboardEvent<HTMLButtonElement>) => void;\n}\n"]} |