forked from react-component/table
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BodyContext.tsx
38 lines (32 loc) · 976 Bytes
/
BodyContext.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import * as React from 'react';
import {
ColumnType,
DefaultRecordType,
ColumnsType,
TableLayout,
RenderExpandIcon,
ExpandableType,
RowClassName,
TriggerEventHandler,
ExpandedRowRender,
} from '../interface';
export interface BodyContextProps<RecordType = DefaultRecordType> {
rowClassName: string | RowClassName<RecordType>;
expandedRowClassName: RowClassName<RecordType>;
columns: ColumnsType<RecordType>;
flattenColumns: readonly ColumnType<RecordType>[];
componentWidth: number;
tableLayout: TableLayout;
fixHeader: boolean;
fixColumn: boolean;
horizonScroll: boolean;
indentSize: number;
expandableType: ExpandableType;
expandRowByClick: boolean;
expandedRowRender: ExpandedRowRender<RecordType>;
expandIcon: RenderExpandIcon<RecordType>;
onTriggerExpand: TriggerEventHandler<RecordType>;
expandIconColumnIndex: number;
}
const BodyContext = React.createContext<BodyContextProps>(null);
export default BodyContext;