You need to sign in or sign up before continuing.
Commit eab0abf3 by G

message and onPress props for the modal

parent e6f5c06d
......@@ -3,7 +3,12 @@ import Box from "@components/bases/Box";
import ErrorIcon from "@components/icons/ErrorIcon";
import { Text } from "react-native";
const ErrorModal = () => {
interface Props {
message?: string;
onPress?: () => void;
}
const ErrorModal = ({ message = "Une erreur s'est produite", onPress = () => {} }: Props) => {
return (
<Box
width={300}
......@@ -20,15 +25,16 @@ const ErrorModal = () => {
shadowColor={"black"}
shadowOffset={{ width: 0, height: 0 }}
shadowOpacity={0.5}
p={"s"}
>
<ErrorIcon />
<Text>Une erreur s'est produite</Text>
<Text>{message}</Text>
<Box style={{ width: "80%" }}>
<Button
variant={"fullError"}
textVariants={"white"}
label="Fermer"
onPress={() => {}}
onPress={onPress}
/>
</Box>
</Box>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment