From 570aa713b1b2becf7c06c89610c75d2cb119b532 Mon Sep 17 00:00:00 2001
From: Sebastien Castiel <sebastien@castiel.me>
Date: Wed, 6 Dec 2023 15:08:52 -0500
Subject: Delete expense

---
 src/components/submit-button.tsx | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

(limited to 'src/components/submit-button.tsx')

diff --git a/src/components/submit-button.tsx b/src/components/submit-button.tsx
index 7489c6c..c5215c5 100644
--- a/src/components/submit-button.tsx
+++ b/src/components/submit-button.tsx
@@ -1,16 +1,16 @@
-import { Button } from '@/components/ui/button'
+import { Button, ButtonProps } from '@/components/ui/button'
 import { Loader2 } from 'lucide-react'
-import { PropsWithChildren, ReactNode } from 'react'
+import { ReactNode } from 'react'
 import { useFormState } from 'react-hook-form'
 
-type Props = PropsWithChildren<{
+type Props = {
   loadingContent: ReactNode
-}>
+} & ButtonProps
 
-export function SubmitButton({ children, loadingContent }: Props) {
+export function SubmitButton({ children, loadingContent, ...props }: Props) {
   const { isSubmitting } = useFormState()
   return (
-    <Button type="submit" disabled={isSubmitting}>
+    <Button type="submit" disabled={isSubmitting} {...props}>
       {isSubmitting ? (
         <>
           <Loader2 className="w-4 h-4 mr-2 animate-spin" /> {loadingContent}
-- 
cgit v1.3

