-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: new styling to loading spinner ux component
- Loading branch information
1 parent
9417d23
commit 7d7bda2
Showing
6 changed files
with
36 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
import { AiOutlineLoading3Quarters } from "react-icons/ai"; | ||
import LoadingSpinner from "@components/ux/LoadingSpinner"; | ||
|
||
const Loading = () => { | ||
return ( | ||
<div className="text-5xl lg:text-6xl absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 rounded-full w-max p-5 bg-rich-black dark:bg-transparent"> | ||
<div className="animate-spin"> | ||
<AiOutlineLoading3Quarters /> | ||
</div> | ||
<div className="text-5xl lg:text-6xl absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 rounded-full w-max p-5"> | ||
<LoadingSpinner size="100px" textSize="6xl" /> | ||
</div> | ||
) | ||
} | ||
); | ||
}; | ||
|
||
export default Loading; | ||
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
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 |
---|---|---|
@@ -1,9 +1,29 @@ | ||
import { AiOutlineLoading3Quarters } from "react-icons/ai"; | ||
|
||
export default function LoadingSpinner() { | ||
type LoadingSpinnerProps = { | ||
size?: string; | ||
textSize?: string; | ||
textSizes?: string; | ||
}; | ||
|
||
export default function LoadingSpinner({ | ||
size, | ||
textSize, | ||
textSizes, | ||
}: LoadingSpinnerProps) { | ||
return ( | ||
<div className="text-6xl flex items-center justify-center rounded-full bg-rich-black dark:bg-transparent animate-spin"> | ||
<AiOutlineLoading3Quarters /> | ||
<div | ||
className={`relative w-[${size}] h-[${size}] ${ | ||
"text-" + [textSize] | ||
} ${textSizes} flex items-center justify-center rounded-full`} | ||
> | ||
<div className="absolute opacity-30"> | ||
<AiOutlineLoading3Quarters className="[&>path]:text-white" /> | ||
</div> | ||
<div className="absolute opacity-30 rotate-90"> | ||
<AiOutlineLoading3Quarters className="[&>path]:text-white" /> | ||
</div> | ||
<AiOutlineLoading3Quarters className="animate-spin duration-500 [&>path]:text-highlight" /> | ||
</div> | ||
); | ||
} | ||
} |