aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShravya Ramesh <shravs1208@gmail.com>2021-05-21 14:50:38 -0700
committerShravya Ramesh <shravs1208@gmail.com>2021-05-21 14:50:38 -0700
commit7a2bc3b67f521e4d4a0b479e72c65bba0a908647 (patch)
tree04a210753899eac662669d242fa0c77dfea37194 /src
parent04b71b8813db48a2ee5f57e617d26fcd5c465621 (diff)
Change onPress as argument
Diffstat (limited to 'src')
-rw-r--r--src/components/common/TaggRadioButton.tsx13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/components/common/TaggRadioButton.tsx b/src/components/common/TaggRadioButton.tsx
index 495eddae..3cc2780c 100644
--- a/src/components/common/TaggRadioButton.tsx
+++ b/src/components/common/TaggRadioButton.tsx
@@ -1,10 +1,15 @@
import React from 'react';
-import {StyleSheet, TouchableOpacity, View} from 'react-native';
+import {
+ GestureResponderEvent,
+ StyleSheet,
+ TouchableOpacity,
+ View,
+} from 'react-native';
import {RADIO_BUTTON_GREY, TAGG_LIGHT_BLUE_2} from '../../constants/constants';
interface TaggRadioButtonProps {
pressed: boolean;
- onPress: Function;
+ onPress: (event: GestureResponderEvent) => void;
}
const TaggRadioButton: React.FC<TaggRadioButtonProps> = ({
pressed,
@@ -20,9 +25,7 @@ const TaggRadioButton: React.FC<TaggRadioButtonProps> = ({
return (
<TouchableOpacity
style={[styles.outer, activeOuterStyle]}
- onPress={() => {
- onPress();
- }}>
+ onPress={onPress}>
{pressed && <View style={[styles.inner, activeInnerStyle]} />}
</TouchableOpacity>
);