-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Expand file tree
/
Copy pathSegmentedButtonMultiselectIcons.tsx
More file actions
49 lines (43 loc) · 1.13 KB
/
SegmentedButtonMultiselectIcons.tsx
File metadata and controls
49 lines (43 loc) · 1.13 KB
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
import * as React from 'react';
import { StyleSheet } from 'react-native';
import { List, SegmentedButtons } from 'react-native-paper';
type Size = 'size-s' | 'size-m' | 'size-l' | 'size-xl' | 'size-xxl';
const SegmentedButtonMultiselectIcons = () => {
const [value, setValue] = React.useState<Size[]>([]);
return (
<List.Section title={`Segmented Button - multiselect only icons`}>
<SegmentedButtons
multiSelect
onValueChange={setValue}
value={value}
style={styles.group}
buttons={[
{
value: 'size-s',
icon: 'size-s',
},
{
value: 'size-m',
icon: 'size-m',
},
{
value: 'size-l',
icon: 'size-l',
},
{
value: 'size-xl',
icon: 'size-xl',
},
{
value: 'size-xxl',
icon: 'size-xxl',
},
]}
/>
</List.Section>
);
};
const styles = StyleSheet.create({
group: { paddingHorizontal: 20, justifyContent: 'center' },
});
export default SegmentedButtonMultiselectIcons;