From eab0abf3081b237ad4413cd4e2da5f2c1f114c48 Mon Sep 17 00:00:00 2001 From: G Date: Tue, 28 May 2024 08:58:00 +0000 Subject: [PATCH] message and onPress props for the modal --- src/components/modals/ErrorModal.tsx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/components/modals/ErrorModal.tsx b/src/components/modals/ErrorModal.tsx index 524f7fd..b5b59cc 100644 --- a/src/components/modals/ErrorModal.tsx +++ b/src/components/modals/ErrorModal.tsx @@ -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 ( { shadowColor={"black"} shadowOffset={{ width: 0, height: 0 }} shadowOpacity={0.5} + p={"s"} > - Une erreur s'est produite + {message}