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

Loading…
Cancel
Save