From 7a2bc3b67f521e4d4a0b479e72c65bba0a908647 Mon Sep 17 00:00:00 2001
From: Shravya Ramesh <shravs1208@gmail.com>
Date: Fri, 21 May 2021 14:50:38 -0700
Subject: Change onPress as argument

---
 src/components/common/TaggRadioButton.tsx | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

(limited to 'src/components/common/TaggRadioButton.tsx')

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>
   );
-- 
cgit v1.2.3-70-g09d2

