UNPKG

@itwin/itwinui-react

Version:

A react component library for iTwinUI

40 lines (39 loc) 1.33 kB
import * as React from 'react'; import type { CellRendererProps } from '../../../react-table/react-table.js'; export type DefaultCellProps<T extends Record<string, unknown>> = { /** * Custom icon to be displayed at the beginning of the cell. */ startIcon?: React.JSX.Element; /** * Custom icon to be displayed at the end of the cell. */ endIcon?: React.JSX.Element; /** * Status of the cell. */ status?: 'positive' | 'negative' | 'warning'; /** * Should the contents of the cell be clamped after a certain number of lines? * * Will be enabled by default if the cell content is a string and a custom `Cell` * is not specified in the column object. */ clamp?: boolean; } & CellRendererProps<T> & React.ComponentPropsWithoutRef<'div'>; export declare const DefaultCellRendererPropsChildren: React.Context<React.ReactNode>; /** * Default cell. * It should be passed to `cellRenderer`. * It can can be used to pass native HTML attributes to the cell container. * @example * { * Header: 'Name', * accessor: 'name', * cellRenderer: (props) => <DefaultCell {...props} />, * } */ export declare const DefaultCell: { <T extends Record<string, unknown>>(props: DefaultCellProps<T>): React.JSX.Element; displayName: string; };