Initial commit from Create Next App

This commit is contained in:
Kaur Laanemäe
2025-04-30 13:29:42 +03:00
commit 60d6adcd94
53 changed files with 5495 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
"use client";
import { Button } from "@/components/ui/button";
import { type ComponentProps } from "react";
import { useFormStatus } from "react-dom";
type Props = ComponentProps<typeof Button> & {
pendingText?: string;
};
export function SubmitButton({
children,
pendingText = "Submitting...",
...props
}: Props) {
const { pending } = useFormStatus();
return (
<Button type="submit" aria-disabled={pending} {...props}>
{pending ? pendingText : children}
</Button>
);
}