UNPKG

@atlaskit/renderer

Version:
31 lines (30 loc) 1.2 kB
import React from 'react'; import type { CellAttributes } from '@atlaskit/adf-schema'; import { SortOrder } from '@atlaskit/editor-common/types'; import type { AnalyticsEventPayload } from '../../analytics/events'; export type TableCellEdgeProps = { reachesBottom?: boolean; reachesLeft?: boolean; reachesRight?: boolean; reachesTop?: boolean; }; type CellProps = CellAttributes & TableCellEdgeProps & { ariaSort?: string; children?: React.ReactNode; className?: string; colGroupWidth?: string; offsetTop?: number; onClick?: () => void; }; export type CellWithSortingProps = CellProps & { allowColumnSorting?: boolean; columnIndex?: number; fireAnalyticsEvent?: (event: AnalyticsEventPayload) => void; isHeaderRow?: boolean; onSorting?: (columnIndex?: number, currentSortOrdered?: SortOrder) => void; sortOrdered?: SortOrder; }; export declare const withSortableColumn: (WrapperComponent: React.ElementType) => (props: CellWithSortingProps) => React.JSX.Element; export declare const TableHeader: (props: CellWithSortingProps) => React.JSX.Element; export declare const TableCell: (props: CellProps) => React.JSX.Element; export {};