diff options
Diffstat (limited to 'src/components/common')
-rw-r--r-- | src/components/common/GenericMoreInfoDrawer.tsx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/components/common/GenericMoreInfoDrawer.tsx b/src/components/common/GenericMoreInfoDrawer.tsx index 3607ef8f..098482ae 100644 --- a/src/components/common/GenericMoreInfoDrawer.tsx +++ b/src/components/common/GenericMoreInfoDrawer.tsx @@ -20,12 +20,13 @@ interface GenericMoreInfoDrawerProps extends ViewProps { isOpen: boolean; setIsOpen: (visible: boolean) => void; showIcons: boolean; + textColor: string; // An array of title, onPressHandler, and icon component buttons: [string, OnPressHandler, JSX.Element?][]; } const GenericMoreInfoDrawer: React.FC<GenericMoreInfoDrawerProps> = (props) => { - const {buttons, showIcons} = props; + const {buttons, showIcons, textColor} = props; // each button is 80px high, cancel button is always there const initialSnapPosition = (buttons.length + 1) * 80 + useSafeAreaInsets().bottom; @@ -47,7 +48,9 @@ const GenericMoreInfoDrawer: React.FC<GenericMoreInfoDrawerProps> = (props) => { <View key={index}> <TouchableOpacity style={panelButtonStyle} onPress={action}> {showIcons && <View style={styles.icon}>{icon}</View>} - <Text style={styles.panelButtonTitle}>{title}</Text> + <Text style={[styles.panelButtonTitle, {color: textColor}]}> + {title} + </Text> </TouchableOpacity> <View style={styles.divider} /> </View> @@ -74,7 +77,6 @@ const styles = StyleSheet.create({ panelButtonTitle: { fontSize: 18, fontWeight: 'bold', - color: 'red', }, icon: { height: 25, |