forked from dominicstop/react-native-ios-context-menu
-
Notifications
You must be signed in to change notification settings - Fork 1
/
DebugControls.tsx
90 lines (84 loc) · 2.38 KB
/
DebugControls.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
/* eslint-disable react-native/no-inline-styles */
import * as React from 'react';
import { useNavigation } from '@react-navigation/native';
import type { ContextMenuExampleProps } from './SharedExampleTypes';
import { ContextMenuCard } from '../components/ContextMenuCard';
import { CardButton } from '../components/Card/CardButton';
import { SHARED_ENV } from '../constants/SharedEnv';
export function DebugControls(props: ContextMenuExampleProps) {
// eslint-disable-next-line react-hooks/rules-of-hooks
const navigation = SHARED_ENV.enableReactNavigation && useNavigation();
return (
<ContextMenuCard
style={props.style}
index={props.index}
title={'Debug Controls'}
subtitle={'For testing and stuff'}
>
<CardButton
title={'Push: Home'}
subtitle={'Navigate to "Home" screen...'}
onPress={() => {
// @ts-ignore
navigation.push('Home');
}}
/>
<CardButton
title={'Push: Test 01'}
subtitle={'Navigate to "Test" screen...'}
onPress={() => {
// @ts-ignore
navigation.push('Test');
}}
/>
<CardButton
title={'Push: Test 02'}
subtitle={'Navigate to "Test02" screen...'}
onPress={() => {
// @ts-ignore
navigation.push('Test02');
}}
/>
<CardButton
title={'Push: Test 03'}
subtitle={'Navigate to "Test03" screen...'}
onPress={() => {
// @ts-ignore
navigation.push('Test03');
}}
/>
<CardButton
title={'Push: Test 04'}
subtitle={'Navigate to "Test04" screen...'}
onPress={() => {
// @ts-ignore
navigation.push('Test04');
}}
/>
<CardButton
title={'Push: Test 05'}
subtitle={'Navigate to "Test05" screen...'}
onPress={() => {
// @ts-ignore
navigation.push('Test05');
}}
/>
<CardButton
title={'Push: Test 06'}
subtitle={'Navigate to "Test06" screen...'}
onPress={() => {
// @ts-ignore
navigation.push('Test06');
}}
/>
<CardButton
title={'Push: Test 07'}
subtitle={'Navigate to "Test05" screen...'}
onPress={() => {
// @ts-ignore
navigation.push('Test07');
}}
/>
</ContextMenuCard>
);
};