import { FC, Key } from 'react';
import { Column, EventWithColumnKey } from '../../../../types';
export interface TableHeaderCellProps {
/**
* Title to display for the column.
*/
column: Column;
/**
* Text alignment for all table cells. Can be superseded by passing the same prop into the `Column` object
* for a specific column.
*/
align?: 'left' | 'right' | 'center';
/**
* Custom class to apply to the `
` element.
*/
className?: string;
/**
* Key of corresponding data value in the table.
*/
dataKey?: Key;
/**
* Remove borders around th elements.
*/
isBorderless?: boolean;
/**
* Determines if table header cells should render as compact (less padding);
*/
isCompact?: boolean;
/**
* If table scrolls vertically, header will remain stuck to the top of the table, and not scroll away.
*/
hasStickyHeader?: boolean;
/**
* Boolean to mark if a column is sortable. This will show the sorting icons. Use
* in conjunction with the `sortDirection` prop to determine which icon is shown.
*/
isSortable?: boolean;
/**
* Callback function to execute when a sortable column's header is clicked.
* Column can be sorted without providing an onSort method, it means that the arrows
* will not be clickable, but they will still represent the sort state
* of a column as determined by the `sortDirection` prop.
*/
onSort?: (event: EventWithColumnKey) => void;
/**
* The key of the sorted column and its sort direction.
*/
sortedColumn?: {
dataKey: string | undefined;
sortDirection: 'none' | 'ascending' | 'descending' | undefined;
};
/**
* Will stick to either the left or right side of a table during horizontal scroll.
*/
sticky?: 'left' | 'right';
/**
* Whether the text should be cut off with ellipsis if it exceeds the width of the column.
*/
truncateOverflow?: boolean;
/**
* Width of the column, if using the `useFixedWidthColumns` prop is set to true.
*/
width?: number;
}
export declare const TableHeaderCell: FC;
|