'use client'; import { Button } from '@/components/ui'; import { type ComponentProps } from 'react'; import { useFormStatus } from 'react-dom'; import { Loader2 } from 'lucide-react'; import { cn } from '@/lib/utils'; export type SubmitButtonProps = Omit< ComponentProps, 'type' | 'aria-disabled' > & { pendingText?: string; pendingTextProps?: ComponentProps<'p'>; loaderProps?: ComponentProps; }; export const SubmitButton = ({ children, className, pendingText = 'Submitting...', pendingTextProps, loaderProps, ...props }: SubmitButtonProps) => { const { pending } = useFormStatus(); return ( ); };