Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
beasy-mobile
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
4
Issues
4
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
G
beasy-mobile
Commits
f716f522
Commit
f716f522
authored
Sep 09, 2024
by
G
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
using a modal card
parent
fa392541
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
20 deletions
+26
-20
ErrorModal.tsx
src/components/modals/ErrorModal.tsx
+26
-20
No files found.
src/components/modals/ErrorModal.tsx
View file @
f716f522
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>
);
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment