liber-salti
Version:
Saltí - Liber Design System
56 lines (55 loc) • 1.56 kB
TypeScript
/// <reference types="react" />
import { ChipColor } from '../Chip/Chip.types';
import { LinkProps } from '../Link/Link.types';
export declare type TableCellVariant = 'chip' | 'number' | 'link' | 'numberLink' | 'sort' | 'header';
export interface TableCellProps {
/**
* The color of the chip
*/
color?: ChipColor;
/**
* The custom children to override the predefined variants
*/
children?: React.ReactNode;
/**
* The content alignment, only applicable to header cells.
*/
align?: 'left' | 'right';
/**
* The label of the cell
*/
label?: string;
/**
* If `true`, the cell is absolutely positioned on the table
*/
detach?: boolean;
/**
* The variant of the cell
*/
variant?: TableCellVariant;
/**
* The props applied to the Link component if variant is `link`
*/
linkProps?: LinkProps;
/**
* If `true`, the padding will be reduced, should not be applied directly to a cell, it's usually managed by the row
*/
dense?: boolean;
/**
* If `true`, the cell will show a selected state
*/
selected?: boolean;
/**
* If `true`, the sort icon will be inverted
*/
sortInverted?: boolean;
/**
* The callback of the click
*/
onSort?: () => void;
/**
* If `true`, the cell will follow the default width rules of the table
* instead of growing until it reaches 400px.
*/
disableOverflow?: boolean;
}