-
-
Notifications
You must be signed in to change notification settings - Fork 223
/
Copy pathmultiple.stories.tsx
52 lines (51 loc) · 1.11 KB
/
multiple.stories.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import * as React from 'react';
import { Resizable } from '../src';
import { storiesOf } from '@storybook/react';
import { style } from './style';
storiesOf('multiple', module)
.add('horizontal', () => (
<div
style={{
width: '100%',
display: 'flex',
overflow: 'hidden',
}}
>
<Resizable
style={style}
defaultSize={{
width: '50%',
height: 200,
}}
maxWidth="100%"
minWidth="1"
>
001
</Resizable>
<div style={{ ...style, width: '100%', minWidth: '1px' }}>002</div>
</div>
))
.add('vertical', () => (
<div
style={{
width: '300px',
height: '400px',
display: 'flex',
flexDirection: 'column',
overflow: 'hidden',
}}
>
<Resizable
style={style}
defaultSize={{
width: '300',
height: '200',
}}
maxHeight="398"
minHeight="1"
>
001
</Resizable>
<div style={{ ...style, width: '300px', height: '100%', minHeight: '1px' }}>002</div>
</div>
));