Commit f716f522 by G

using a modal card

parent fa392541
import { useModalsManagerContext } from "@/contexts/ModalsManagerContext";
import Button from "@components/Button";
import Card from "@components/Card";
import Box from "@components/bases/Box";
// import { Text } from "react-native"
import Text from "@components/bases/Text";
import ErrorIcon from "@components/icons/ErrorIcon";
import { Text } from "react-native";
interface Props {
message?: string;
......@@ -12,25 +14,28 @@ interface Props {
const ErrorModal = ({ message = "Une erreur s'est produite" }: Props) => {
const { closeModal } = useModalsManagerContext();
return (
<Box
width={300}
height={200}
backgroundColor={"white"}
alignItems={"center"}
justifyContent={"center"}
alignSelf={"center"}
marginTop={"x240"}
position={"absolute"}
zIndex={10}
borderRadius={20}
gap={"m"}
shadowColor={"black"}
shadowOffset={{ width: 0, height: 0 }}
shadowOpacity={0.5}
p={"s"}
>
// <Box
// width={300}
// height={200}
// backgroundColor={"white"}
// alignItems={"center"}
// justifyContent={"center"}
// alignSelf={"center"}
// marginTop={"x240"}
// position={"absolute"}
// zIndex={10}
// borderRadius={20}
// gap={"m"}
// shadowColor={"black"}
// shadowOffset={{ width: 0, height: 0 }}
// shadowOpacity={0.5}
// p={"s"}
// >
<Card variant={"modal"}>
<ErrorIcon />
<Text>{message}</Text>
<Text variant={"gray"} fontWeight={"bold"}>
{message}
</Text>
<Box style={{ width: "80%" }}>
<Button
variant={"fullError"}
......@@ -39,7 +44,8 @@ const ErrorModal = ({ message = "Une erreur s'est produite" }: Props) => {
onPress={closeModal}
/>
</Box>
</Box>
</Card>
// </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