import React from 'react'; import PropTypes from 'prop-types'; import { ComponentProps } from '../utils/types'; /** @public */ type CellClickHandler = (event: React.MouseEvent | React.KeyboardEvent, data?: any) => void; interface CellPropsBase { /** Align the text in the cell. */ align?: 'left' | 'center' | 'right'; /** The cell's appearance will default to `'link'` when a `onClick` handler is provided. * 'data': Is used for regular text and row expansion. * - The background color does not change on cell hover. * 'link': * - The text is blue. * 'rowLink': * - The text is white and the background color of the row is lighter on row hover. * @private */ appearance?: 'data' | 'link' | 'rowLink'; /** @private Used to set the $clickable appearance without an onClick */ appearClickable?: boolean; children?: React.ReactNode; /** This data is returned with the onClick events as the second argument. */ data?: any; /** * A React ref which is set to the DOM element when the component mounts and null when it unmounts. */ elementRef?: React.Ref; /** @private. */ isPinned?: boolean; /** * @private * Used to style the primary cell when row is clickable */ isPrimaryCell?: boolean; /** Providing an `onClick` handler enables focus, hover, and related styles. */ onClick?: CellClickHandler; /** @private This will be passed through, and will work as expected. */ onKeyDown?: React.KeyboardEventHandler; /** @private */ disabled?: boolean; /** @private */ expand?: boolean; /** @private. */ stripe?: 'odd' | 'even' | 'none'; /** @private. */ variant?: 'toggle' | 'expand' | 'drag' | 'actions'; } type CellProps = ComponentProps; declare function Cell({ align, appearance, appearClickable, children, data, disabled, elementRef, isPinned, isPrimaryCell, onClick, onKeyDown, stripe, variant, ...otherProps }: CellProps): React.JSX.Element; declare namespace Cell { var propTypes: { align: PropTypes.Requireable; /** @private */ appearance: PropTypes.Requireable; /** @private Used to set the $clickable appearance without an onClick */ appearClickable: PropTypes.Requireable; children: PropTypes.Requireable; data: PropTypes.Requireable; elementRef: PropTypes.Requireable; /** @private */ isPrimaryCell: PropTypes.Requireable; /** @private */ isPinned: PropTypes.Requireable; onClick: PropTypes.Requireable<(...args: any[]) => any>; /** @private */ onKeyDown: PropTypes.Requireable<(...args: any[]) => any>; /** @private */ disabled: PropTypes.Requireable; /** @private. */ expand: PropTypes.Requireable; /** @private. */ stripe: PropTypes.Requireable; /** @private. */ variant: PropTypes.Requireable; }; var splunkUiType: string; } export default Cell; export { CellClickHandler, CellProps };