-
Notifications
You must be signed in to change notification settings - Fork 831
/
table.ts
57 lines (54 loc) · 1.4 KB
/
table.ts
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import {Table} from 'baseui/table';
import {PropTypes} from 'react-view';
import {TConfig} from '../types';
const tableProps = require('!!extract-react-types-loader!../../../../src/table/table.js');
const TableConfig: TConfig = {
imports: {
'baseui/table': {
named: ['Table'],
},
},
scope: {Table},
theme: [
'tableHeadBackgroundColor',
'tableBackground',
'tableStripedBackground',
'tableFilter',
'tableFilterHeading',
'tableFilterBackground',
'tableFilterFooterBackground',
],
props: {
columns: {
value: `['Name', 'Age', 'Address']`,
type: PropTypes.Array,
description: 'Table columns. Data passed to each header cell.',
},
data: {
value: `[
['Sarah Brown', 31, '100 Broadway st. New York City, New York'],
['Jane Smith', 32, '100 Market st. San Francisco, California'],
]`,
type: PropTypes.Array,
description: 'Table rows. Data passed to each row and cell',
},
horizontalScrollWidth: {
value: undefined,
type: PropTypes.String,
description: 'Table width fills this provided value.',
},
overrides: {
value: undefined,
type: PropTypes.Custom,
description: 'Lets you customize all aspects of the component.',
custom: {
names: [],
sharedProps: {},
},
},
},
mapTokensToProps: {
Table: tableProps,
},
};
export default TableConfig;