-
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.
- Loading branch information
Showing
10 changed files
with
109 additions
and
5 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
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
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
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
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
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,30 @@ | ||
import { twMerge } from "tailwind-merge"; | ||
import Loading from "./Loading"; | ||
|
||
type Props = { | ||
dark?: boolean; | ||
message?: string; | ||
}; | ||
|
||
export function FullScreenLoading({ dark = false, message }: Props) { | ||
return ( | ||
<div | ||
className={twMerge( | ||
"absolute inset-0 flex items-center justify-center z-50", | ||
dark ? "bg-black bg-opacity-75" : "bg-white bg-opacity-75" | ||
)} | ||
> | ||
<div className="flex flex-col items-center justify-center"> | ||
<p | ||
className={twMerge( | ||
dark ? "text-white" : "text-black", | ||
"text-2xl p-4" | ||
)} | ||
> | ||
{message} | ||
</p> | ||
<Loading /> | ||
</div> | ||
</div> | ||
); | ||
} |
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,14 @@ | ||
import React from "react"; | ||
import Spinner from "./Spinner"; | ||
|
||
const Loading = () => { | ||
return ( | ||
<div className="relative w-full h-full z-50"> | ||
<div className="flex items-center justify-center"> | ||
<Spinner size="md" /> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Loading; |
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,18 @@ | ||
type Props = { | ||
size: "xs" | "md" | "lg" | "sm"; | ||
}; | ||
const Spinner = ({ size }: Props) => { | ||
const dimensions = { | ||
md: "h-16 w-16", | ||
lg: "h-32 w-32", | ||
sm: "h-8 w-8", | ||
xs: "h-4 w-4", | ||
}; | ||
return ( | ||
<div | ||
className={`animate-spin rounded-full border-t-2 border-b-2 border-gray-500 ${dimensions[size]}`} | ||
></div> | ||
); | ||
}; | ||
|
||
export default Spinner; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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