MCPcopy Create free account
hub / github.com/celerforge/freenote / FormButton

Function FormButton

src/components/form-button.tsx:9–29  ·  view source on GitHub ↗
({
  children,
  pendingText,
  className,
  ...props
}: FormButtonProps)

Source from the content-addressed store, hash-verified

7}
8
9export function FormButton({
10 children,
11 pendingText,
12 className,
13 ...props
14}: FormButtonProps) {
15 const { isSubmitting } = useFormState();
16
17 return (
18 <Button className={className} disabled={isSubmitting} {...props}>
19 {isSubmitting ? (
20 <>
21 <Icons.refreshCw className="sp-mr-2 sp-h-4 sp-w-4 sp-animate-spin" />
22 {pendingText || "Processing..."}
23 </>
24 ) : (
25 <>{children}</>
26 )}
27 </Button>
28 );
29}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected