Browse Source

Change order of confirm/decline btns and changing some styling

master
GabrielTrettel 3 years ago
parent
commit
9169fc4c9a
  1. 25
      src/app/components/ConfirmationModal.js

25
src/app/components/ConfirmationModal.js

@ -15,7 +15,7 @@ function Btn({ label, onPress, bgColor, txtColor, style={} }) {
borderRadius: 6, borderRadius: 6,
}]} }]}
> >
<Text style={{ color: txtColor, fontWeight: "bold" }}>{label}</Text>
<Text style={{ color: txtColor, fontWeight: "bold", textTransform: "uppercase" }}>{label}</Text>
</View> </View>
</TouchableOpacity> </TouchableOpacity>
); );
@ -58,7 +58,7 @@ export default function ConfirmationModal({
)} )}
<View style={{ flexDirection: "row", alignItems: "center" }}> <View style={{ flexDirection: "row", alignItems: "center" }}>
{icon && ( {icon && (
<View style={{ marginRight: 5 }}>
<View style={{ marginRight: 12 }}>
<Ionicons name={icon} size={30} color={colors.primary} /> <Ionicons name={icon} size={30} color={colors.primary} />
</View> </View>
)} )}
@ -70,21 +70,21 @@ export default function ConfirmationModal({
justifyContent: "flex-end", justifyContent: "flex-end",
marginTop: 24, marginTop: 24,
}} }}
>
{onConfirm && confirmationLabel && (
>
{onDecline && declineLabel && (
<Btn <Btn
style={{marginRight: 16}} style={{marginRight: 16}}
label={confirmationLabel}
onPress={onConfirm}
bgColor={colors.primary}
label={declineLabel}
onPress={onDecline}
bgColor={colors.secondary}
txtColor={colors.white} txtColor={colors.white}
/> />
)} )}
{onDecline && declineLabel && (
{onConfirm && confirmationLabel && (
<Btn <Btn
label={declineLabel}
onPress={onDecline}
bgColor={colors.secondary}
label={confirmationLabel}
onPress={onConfirm}
bgColor={colors.primary}
txtColor={colors.white} txtColor={colors.white}
/> />
)} )}
@ -105,8 +105,7 @@ const styles = StyleSheet.create({
borderColor: colors.primary, borderColor: colors.primary,
borderWidth: 2, borderWidth: 2,
borderRadius: 12, borderRadius: 12,
paddingVertical: 16,
paddingHorizontal: 16,
padding: 16,
}, },
text: { text: {
fontSize: dimensions.text.default, fontSize: dimensions.text.default,

Loading…
Cancel
Save