Browse Source

ConfirmationModal in Account screen

master
GabrielTrettel 3 years ago
parent
commit
3e974fbc34
  1. 28
      src/app/components/ConfirmationModal.js

28
src/app/components/ConfirmationModal.js

@ -1,20 +1,12 @@
import React from "react"; import React from "react";
import {
Modal,
StyleSheet,
Text,
TouchableHighlight,
View,
} from "react-native";
import { MaterialCommunityIcons } from "@expo/vector-icons";
import { Modal, StyleSheet, Text, TouchableOpacity, View } from "react-native";
import colors from "../config/colors"; import colors from "../config/colors";
import { dimensions } from "../config/dimensions"; import { dimensions } from "../config/dimensions";
import { TouchableOpacity } from "react-native-gesture-handler";
function Btn({ label, onPress, bgColor, txtColor }) { function Btn({ label, onPress, bgColor, txtColor }) {
console.log("pimba");
return ( return (
<TouchableOpacity onPress={() => onPress()}>
<TouchableOpacity onPress={onPress}>
<View <View
style={{ style={{
paddingHorizontal: 30, paddingHorizontal: 30,
@ -45,10 +37,20 @@ export default function ConfirmationModal({
animationType="slide" animationType="slide"
visible={show} visible={show}
supportedOrientations={["portrait"]} supportedOrientations={["portrait"]}
>
<TouchableOpacity onPress={onDecline}>
<View
style={{
width: "100%",
height: "100%",
justifyContent: "center",
}}
> >
<View style={styles.container}> <View style={styles.container}>
<View style={{ flex: 1 }}> <View style={{ flex: 1 }}>
<Text style={[styles.text, { fontSize: dimensions.text.secondary }]}>
<Text
style={[styles.text, { fontSize: dimensions.text.secondary }]}
>
{title} {title}
</Text> </Text>
</View> </View>
@ -72,6 +74,8 @@ export default function ConfirmationModal({
/> />
</View> </View>
</View> </View>
</View>
</TouchableOpacity>
</Modal> </Modal>
); );
} }

Loading…
Cancel
Save