fix: update button components to include loading state and improve styling in navbar and login page

This commit is contained in:
Ardeman
2025-03-11 06:08:20 +08:00
parent dbeec8acf3
commit 66bc731b07
2 changed files with 13 additions and 9 deletions
+5 -2
View File
@@ -1,8 +1,9 @@
import { Button, Popover, PopoverButton, PopoverPanel } from '@headlessui/react'
import { Popover, PopoverButton, PopoverPanel } from '@headlessui/react'
import { Link, useFetcher, useRouteLoaderData } from 'react-router'
import { ChevronIcon } from '~/components/icons/chevron'
import { ProfileIcon } from '~/components/icons/profile'
import { Button } from '~/components/ui/button'
import { APP } from '~/configs/meta'
import type { loader } from '~/routes/_admin.lg-admin'
@@ -52,8 +53,10 @@ export const Navbar = () => {
className="grid"
>
<Button
disabled={fetcher.state !== 'idle'}
isLoading={fetcher.state !== 'idle'}
type="submit"
className="cursor-pointer rounded p-1 hover:bg-[#707FDD]/10 hover:text-[#5363AB]"
className="w-full rounded p-1"
>
Logout
</Button>