-
Notifications
You must be signed in to change notification settings - Fork 35
/
ContextMenuViewTest02.tsx
123 lines (119 loc) · 3.47 KB
/
ContextMenuViewTest02.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
// import * as React from 'react';
import { ContextMenuView } from 'react-native-ios-context-menu';
import type { ExampleItemProps } from './SharedExampleTypes';
import { ContextMenuCard } from '../components/ContextMenuCard';
export function ContextMenuViewTest02(props: ExampleItemProps) {
return (
<ContextMenuView
style={props.style}
menuConfig={{
menuTitle: 'ContextMenuViewTest02',
menuItems: [{
menuTitle: 'Inline Submenu #1',
menuOptions: ['displayInline'],
menuItems: [{
actionKey : 'key-01' ,
actionTitle: 'Inline Action #1',
icon: {
type: 'IMAGE_SYSTEM',
imageValue: {
systemName: 'hare',
},
}
}, {
menuTitle : 'Submenu #1...',
icon: {
type: 'IMAGE_SYSTEM',
imageValue: {
systemName: 'calendar',
},
},
menuItems: [{
actionKey : 'key-02-01',
actionTitle: 'Submenu Action #1',
icon: {
type: 'IMAGE_SYSTEM',
imageValue: {
systemName: 'paperclip',
},
}
}, {
menuTitle: 'Inline Submenu #4',
menuOptions: ['displayInline'],
menuItems: [{
actionKey : 'key-02-02',
actionTitle: 'Inline Submenu Action #2',
icon: {
type: 'IMAGE_SYSTEM',
imageValue: {
systemName: 'house',
},
}
}, {
actionKey : 'key-02-03',
actionTitle: 'Inline Submenu Action #3',
icon: {
type: 'IMAGE_SYSTEM',
imageValue: {
systemName: 'tag',
},
}
}],
}, {
actionKey : 'key-02-04',
actionTitle: 'Submenu Action #4',
icon: {
type: 'IMAGE_SYSTEM',
imageValue: {
systemName: 'sun.haze',
},
}
}],
}],
}, {
menuTitle: 'Inline Submenu #2',
menuOptions: ['displayInline'],
menuItems: [{
actionKey : 'key-03' ,
actionTitle : 'Inline Submenu Action #2',
menuAttributes: ['disabled'],
icon: {
type: 'IMAGE_SYSTEM',
imageValue: {
systemName: 'suit.heart',
},
}
}, {
actionKey : 'key-04' ,
actionTitle: 'Inline Submenu Action #3',
icon: {
type: 'IMAGE_SYSTEM',
imageValue: {
systemName: 'suit.club',
},
}
}],
}, {
actionKey : 'key-05' ,
actionTitle : 'Action #4',
menuAttributes: ['destructive'],
icon: {
type: 'IMAGE_SYSTEM',
imageValue: {
systemName: 'trash',
},
}
}]
}}
>
<ContextMenuCard
index={props.index}
title={'ContextMenuViewTest02'}
subtitle={'inline menus'}
description={[
`Test for multiple inline menu's + nested submenu's`
]}
/>
</ContextMenuView>
);
};