-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(UserDetailEditor): loading skeleton
- Loading branch information
1 parent
f22b9a8
commit bd5bd11
Showing
2 changed files
with
35 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
src/components/user/user-detail-editor/UserDetailEditorSkeleton.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { Container, Skeleton, Stack, Typography } from "@mui/material"; | ||
import { Box } from "@mui/system"; | ||
|
||
export default function UserDetailEditorSkeleton({ | ||
isSignUp, | ||
}: { | ||
isSignUp?: boolean; | ||
}) { | ||
return ( | ||
<Container component="main" maxWidth="xs"> | ||
<Stack alignItems={"center"} mt={4}> | ||
<Typography variant="h5" sx={{ my: 1 }}> | ||
{isSignUp ? "Registrer deg" : "Brukerinnstillinger"} | ||
</Typography> | ||
<Box width="100%"> | ||
<Skeleton width={"100%"} height={80} sx={{ mb: 10 }} /> | ||
{Array.from({ length: 6 }).map((index) => ( | ||
<Skeleton | ||
width={"100%"} | ||
height={80} | ||
key={`s-${index}`} | ||
sx={{ my: -2 }} | ||
/> | ||
))} | ||
</Box> | ||
</Stack> | ||
</Container> | ||
); | ||
} |