Browse Source

Adding custom text colors in ConfirmationModal buttons

master
GabrielTrettel 3 years ago
parent
commit
f20311548c
  1. 10
      src/app/components/ConfirmationModal.js

10
src/app/components/ConfirmationModal.js

@ -4,18 +4,17 @@ import colors from "../config/colors";
import { dimensions } from "../config/dimensions";
function Btn({ label, onPress, bgColor, txtColor }) {
console.log("pimba");
return (
<TouchableOpacity onPress={onPress}>
<View
style={{
paddingHorizontal: 30,
paddingVertical: 5,
paddingHorizontal: 40,
paddingVertical: 7,
backgroundColor: bgColor,
borderRadius: 6,
}}
>
<Text>{label}</Text>
<Text style={{color: txtColor, fontWeight: "bold"}}>{label}</Text>
</View>
</TouchableOpacity>
);
@ -30,7 +29,6 @@ export default function ConfirmationModal({
onConfirm = () => {},
onDecline = () => {},
}) {
console.log("show: " + show);
return (
<Modal
transparent={true}
@ -66,11 +64,13 @@ export default function ConfirmationModal({
label={confirmationLabel}
onPress={onConfirm}
bgColor={colors.secondary}
txtColor={colors.white}
/>
<Btn
label={declineLabel}
onPress={onDecline}
bgColor={colors.lightGray}
txtColor={colors.black}
/>
</View>
</View>

Loading…
Cancel
Save