diff --git a/app/components/ui/dialog-actions.tsx b/app/components/ui/dialog-actions.tsx new file mode 100644 index 0000000..3d64102 --- /dev/null +++ b/app/components/ui/dialog-actions.tsx @@ -0,0 +1,30 @@ +import { Loader2 } from 'lucide-react'; +import { Button, type ButtonProps } from '~/components/ui/button'; +import { DialogClose, DialogFooter } from '~/components/ui/dialog'; + +interface DialogActionsProps { + confirmLabel: string; + pendingLabel?: string; + cancelLabel?: string; + pending?: boolean; + disabled?: boolean; + variant?: ButtonProps['variant']; + onConfirm?: () => void; +} + +// Cancel + confirm footer; without `onConfirm` the confirm button submits the surrounding form +export function DialogActions({ confirmLabel, pendingLabel, cancelLabel = 'Cancel', pending, disabled, variant, onConfirm }: DialogActionsProps) { + return ( + + + + + + + ); +}