Skip to content

Commit

Permalink
feat: adjust the display of loading ui to menu buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
moonbamijam committed Jun 29, 2024
1 parent fd4d460 commit 182f54a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion components/buttons/NavMenuBtn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default function NavMenuBtn() {
)}
</Button>
) : (
<div className="fixed left-8 bottom-8 sm:left-12 sm:bottom-12 lg:left-24 lg:bottom-16 w-[50px] h-[50px] text-xl z-[100] flex justify-center items-center rounded-full">
<div className="fixed lg:hidden left-8 bottom-8 sm:left-12 sm:bottom-12 lg:left-24 lg:bottom-16 w-[50px] h-[50px] text-xl z-[100] flex justify-center items-center rounded-full">
<LoadingSpinner size="40px" fontSizes="text-xl xl:text-2xl" />
</div>
)}
Expand Down
2 changes: 1 addition & 1 deletion components/header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export default function Header() {
)}
</Button>
) : (
<LoadingSpinner size="40px" fontSizes="text-xl xl:text-2xl" />
<LoadingSpinner size="40px" fontSizes="text-xl xl:text-2xl" className="hidden lg:flex" />
)}
<ThemeSwitchBtn />
</nav>
Expand Down
4 changes: 3 additions & 1 deletion components/ui/LoadingSpinner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,18 @@ type LoadingSpinnerProps = {
size?: string;
fontSize?: string;
fontSizes?: string;
className?: string;
};

export default function LoadingSpinner({
size,
fontSize,
fontSizes,
className,
}: LoadingSpinnerProps) {
return (
<div
className={`relative w-[${size}] h-[${size}] flex items-center justify-center rounded-full [&>svg>path]:text-[${fontSize}] ${fontSizes}`}
className={`relative w-[${size}] h-[${size}] flex items-center justify-center rounded-full [&>svg>path]:text-[${fontSize}] ${fontSizes} ${className}`}
>
<div className="absolute opacity-30">
<AiOutlineLoading3Quarters className="[&>path]:text-surface" />
Expand Down

0 comments on commit 182f54a

Please sign in to comment.