-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
splitter.js
72 lines (70 loc) · 1.92 KB
/
splitter.js
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
const SplitterProps = [
{
name: 'layout',
type: 'string',
default: 'horizontal',
description: 'Orientation of the panels, valid values are "horizontal" and "vertical".'
},
{
name: 'gutterSize',
type: 'number',
default: '4',
description: 'Size of the divider in pixels.'
},
{
name: 'stateKey',
type: 'string',
default: 'null',
description: 'Storage identifier of a stateful Splitter.'
},
{
name: 'stateStorage',
type: 'string',
default: 'storage',
description: 'Defines where a stateful splitter keeps its state, valid values are "session" for sessionStorage and "local" for localStorage.'
},
{
name: 'step',
type: 'number',
default: '5',
description: 'Step factor to increment/decrement the size of the panels while pressing the arrow keys.'
},
{
name: 'pt',
type: 'any',
default: 'null',
description: 'Used to pass attributes to DOM elements inside the component.'
},
{
name: 'unstyled',
type: 'boolean',
default: 'false',
description: 'When enabled, it removes component related styles in the core.'
}
];
const SplitterEvents = [
{
name: 'resizened',
description: 'Callback to invoke when resize ends.',
arguments: [
{
name: 'event.originalEvent',
type: 'object',
description: 'Browser event'
},
{
name: 'event.sizes',
type: 'array',
description: 'Sizes of the panels as an array'
}
]
}
];
module.exports = {
splitter: {
name: 'Splitter',
description: 'Splitter is utilized to separate and resize panels',
props: SplitterProps,
events: SplitterEvents
}
};