/
sublist.tsx
80 lines (77 loc) · 2.09 KB
/
sublist.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
import * as React from 'react';
import {ChevronRight, Search} from 'baseui/icon';
import {ListItem, ListItemLabel, ARTWORK_SIZES} from 'baseui/list';
import {useStyletron} from 'baseui';
export default () => {
const [css] = useStyletron();
return (
<ul
className={css({
width: '375px',
paddingLeft: 0,
paddingRight: 0,
})}
>
<ListItem sublist>
<ListItemLabel sublist>Label One</ListItemLabel>
</ListItem>
<ListItem sublist>
<ListItemLabel sublist>Label Two</ListItemLabel>
</ListItem>
<ListItem
artwork={Search}
endEnhancer={() => <ChevronRight />}
sublist
>
<ListItemLabel sublist>Label Three</ListItemLabel>
</ListItem>
<ListItem
artwork={Search}
artworkSize={ARTWORK_SIZES.SMALL}
endEnhancer={() => <ChevronRight />}
sublist
>
<ListItemLabel sublist>Label Four</ListItemLabel>
</ListItem>
<ListItem
artwork={Search}
// Medium is aliased to Small when sublist
artworkSize={ARTWORK_SIZES.MEDIUM}
endEnhancer={() => <ChevronRight />}
sublist
>
<ListItemLabel sublist>Label Five</ListItemLabel>
</ListItem>
<ListItem
artwork={Search}
artworkSize={ARTWORK_SIZES.LARGE}
endEnhancer={() => (
<ListItemLabel sublist>Label Six</ListItemLabel>
)}
sublist
>
<ListItemLabel sublist>Label Six</ListItemLabel>
</ListItem>
<ListItem
artwork={Search}
artworkSize={ARTWORK_SIZES.LARGE}
endEnhancer={() => (
<ListItemLabel sublist>Label Seven</ListItemLabel>
)}
sublist
>
<ListItemLabel sublist>Label Seven</ListItemLabel>
</ListItem>
<ListItem
artwork={Search}
artworkSize={ARTWORK_SIZES.LARGE}
endEnhancer={() => (
<ListItemLabel sublist>Label Eight</ListItemLabel>
)}
sublist
>
<ListItemLabel sublist>Label Eight</ListItemLabel>
</ListItem>
</ul>
);
};