-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Expand file tree
/
Copy pathSegmentedButtonsExample.tsx
More file actions
61 lines (55 loc) · 1.81 KB
/
SegmentedButtonsExample.tsx
File metadata and controls
61 lines (55 loc) · 1.81 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
50
51
52
53
54
55
56
57
58
59
60
61
import * as React from 'react';
import type { StackNavigationProp } from '@react-navigation/stack';
import { List } from 'react-native-paper';
import {
SegmentedButtonDefault,
SegmentedButtonDisabled,
SegmentedButtonMultiselect,
SegmentedButtonMultiselectIcons,
SegmentedButtonOnlyIcons,
SegmentedButtonOnlyIconsWithCheck,
SegmentedButtonWithDensity,
SegmentedButtonWithSelectedCheck,
SegmentButtonCustomColorCheck,
} from './SegmentedButtons';
import ScreenWrapper from '../ScreenWrapper';
type Props = {
navigation: StackNavigationProp<{ [key: string]: undefined }>;
};
const SegmentedButtonExample = ({ navigation }: Props) => {
return (
<ScreenWrapper>
<List.Section title={`Segmented Button Example Usage`}>
<List.Item
title="Single select"
description="Go to the example"
onPress={() => navigation.navigate('segmentedButtonRealCase')}
right={(props) => (
<List.Icon iconSize={32} {...props} icon="arrow-right" />
)}
/>
<List.Item
title="Multiselect select"
description="Go to the example"
onPress={() =>
navigation.navigate('segmentedButtonMultiselectRealCase')
}
right={(props) => (
<List.Icon iconSize={32} {...props} icon="arrow-right" />
)}
/>
</List.Section>
<SegmentedButtonDefault />
<SegmentedButtonWithSelectedCheck />
<SegmentedButtonOnlyIconsWithCheck />
<SegmentedButtonWithDensity />
<SegmentedButtonOnlyIcons />
<SegmentedButtonMultiselect />
<SegmentedButtonMultiselectIcons />
<SegmentButtonCustomColorCheck />
<SegmentedButtonDisabled />
</ScreenWrapper>
);
};
SegmentedButtonExample.title = 'Segmented Buttons';
export default SegmentedButtonExample;