feat(ui): complete phase 4 Poyraz UI foundation
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import { useFormStatus } from "react-dom";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Loader2 } from "lucide-react";
|
||||
import { Button } from "poyraz-ui/atoms";
|
||||
import React from "react";
|
||||
|
||||
interface SubmitButtonProps extends React.ComponentProps<typeof Button> {
|
||||
@@ -18,10 +17,9 @@ export function SubmitButton({
|
||||
const { pending } = useFormStatus();
|
||||
|
||||
return (
|
||||
<Button type={type} disabled={pending} {...props}>
|
||||
<Button type={type} disabled={pending} loading={pending} aria-busy={pending} {...props}>
|
||||
{pending ? (
|
||||
<>
|
||||
<Loader2 className="h-4 w-4 animate-spin" />
|
||||
{pendingText || children}
|
||||
</>
|
||||
) : (
|
||||
|
||||
Reference in New Issue
Block a user