mirror of
https://github.com/shadcn-ui/taxonomy
synced 2026-05-24 09:48:32 +00:00
fix: add disable state when loading
This commit is contained in:
parent
718ed3487f
commit
6a44ab9c33
1 changed files with 6 additions and 2 deletions
|
|
@ -77,7 +77,10 @@ export function UserAuthForm({ className, ...props }: UserAuthFormProps) {
|
|||
</p>
|
||||
)}
|
||||
</div>
|
||||
<button className="inline-flex w-full items-center justify-center rounded-lg bg-[#24292F] px-5 py-2.5 text-center text-sm font-medium text-white hover:bg-[#24292F]/90 focus:outline-none focus:ring-4 focus:ring-[#24292F]/50 dark:hover:bg-[#050708]/30 dark:focus:ring-slate-500">
|
||||
<button
|
||||
className="inline-flex w-full items-center justify-center rounded-lg bg-[#24292F] px-5 py-2.5 text-center text-sm font-medium text-white hover:bg-[#24292F]/90 focus:outline-none focus:ring-4 focus:ring-[#24292F]/50 disabled:opacity-50 dark:hover:bg-[#050708]/30 dark:focus:ring-slate-500"
|
||||
disabled={isLoading}
|
||||
>
|
||||
{isLoading && (
|
||||
<Icons.spinner className="mr-2 h-4 w-4 animate-spin" />
|
||||
)}
|
||||
|
|
@ -95,8 +98,9 @@ export function UserAuthForm({ className, ...props }: UserAuthFormProps) {
|
|||
</div>
|
||||
<button
|
||||
type="button"
|
||||
className="inline-flex w-full items-center justify-center rounded-lg border bg-white px-5 py-2.5 text-center text-sm font-medium text-black hover:bg-slate-100 focus:outline-none focus:ring-4 focus:ring-[#24292F]/50 dark:hover:bg-[#050708]/30 dark:focus:ring-slate-500"
|
||||
className="inline-flex w-full items-center justify-center rounded-lg border bg-white px-5 py-2.5 text-center text-sm font-medium text-black hover:bg-slate-100 focus:outline-none focus:ring-4 focus:ring-[#24292F]/50 disabled:opacity-50 dark:hover:bg-[#050708]/30 dark:focus:ring-slate-500"
|
||||
onClick={() => signIn("github")}
|
||||
disabled={isLoading}
|
||||
>
|
||||
<svg
|
||||
className="mr-2 h-4 w-4"
|
||||
|
|
|
|||
Loading…
Reference in a new issue