-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Expand file tree
/
Copy pathtestingBase.tsx
More file actions
44 lines (40 loc) · 980 Bytes
/
testingBase.tsx
File metadata and controls
44 lines (40 loc) · 980 Bytes
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
import React from 'react';
import {
StyleSheet,
Text,
View,
Pressable,
PressableProps as RNPressableProps,
} from 'react-native';
import {
Pressable as GesturizedPressable,
PressableProps as GHPressableProps,
} from 'react-native-gesture-handler';
const TestingBase = (props: GHPressableProps & RNPressableProps) => (
<>
<GesturizedPressable {...props}>
<View style={styles.textWrapper}>
<Text style={styles.text}>Gesturized pressable!</Text>
</View>
</GesturizedPressable>
<Pressable {...props}>
<View style={styles.textWrapper}>
<Text style={styles.text}>Legacy pressable!</Text>
</View>
</Pressable>
</>
);
const BACKGROUND_COLOR = '#F5FCFF';
export default TestingBase;
export { BACKGROUND_COLOR };
const styles = StyleSheet.create({
textWrapper: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
},
text: {
color: BACKGROUND_COLOR,
textAlign: 'center',
},
});