@@ -30,31 +30,34 @@ const WithoutEventComponent = (_props: WithoutEventComponentProps) => (
30
30
</ View >
31
31
) ;
32
32
33
- type CustomEventComponentProps = {
34
- onCustomEvent : ( ) => void ;
35
- } ;
36
- const CustomEventComponent = ( { onCustomEvent } : CustomEventComponentProps ) => (
37
- < TouchableOpacity onPress = { onCustomEvent } >
38
- < Text > Custom event component</ Text >
39
- </ TouchableOpacity >
40
- ) ;
41
-
42
- type MyCustomButtonProps = {
43
- handlePress : ( ) => void ;
44
- text : string ;
45
- } ;
46
- const MyCustomButton = ( { handlePress, text } : MyCustomButtonProps ) => (
47
- < OnPressComponent onPress = { handlePress } text = { text } />
48
- ) ;
49
-
50
- type CustomEventComponentWithCustomNameProps = {
51
- handlePress : ( ) => void ;
52
- } ;
53
- const CustomEventComponentWithCustomName = ( {
54
- handlePress,
55
- } : CustomEventComponentWithCustomNameProps ) => (
56
- < MyCustomButton handlePress = { handlePress } text = "Custom component" />
57
- ) ;
33
+ // type CustomEventComponentProps = {
34
+ // onCustomEvent: () => void;
35
+ // };
36
+
37
+ // const CustomEventComponent = ({ onCustomEvent }: CustomEventComponentProps) => (
38
+ // <TouchableOpacity onPress={onCustomEvent}>
39
+ // <Text>Custom event component</Text>
40
+ // </TouchableOpacity>
41
+ // );
42
+
43
+ // type MyCustomButtonProps = {
44
+ // handlePress: () => void;
45
+ // text: string;
46
+ // };
47
+
48
+ // const MyCustomButton = ({ handlePress, text }: MyCustomButtonProps) => (
49
+ // <OnPressComponent onPress={handlePress} text={text} />
50
+ // );
51
+
52
+ // type CustomEventComponentWithCustomNameProps = {
53
+ // handlePress: () => void;
54
+ // };
55
+
56
+ // const CustomEventComponentWithCustomName = ({
57
+ // handlePress,
58
+ // }: CustomEventComponentWithCustomNameProps) => (
59
+ // <MyCustomButton handlePress={handlePress} text="Custom component" />
60
+ // );
58
61
59
62
describe ( 'fireEvent' , ( ) => {
60
63
test ( 'should invoke specified event' , ( ) => {
0 commit comments