From ffeaff58382fae392702a355e0e58a63d7505885 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vojt=C4=9Bch=20P=C3=A1rys?= Date: Mon, 20 Apr 2026 10:38:06 +0200 Subject: [PATCH] feat: allow passing disabled prop to PersistButton Extracts disabled from props and combines it with the internal isPersisting/!isDirty state so callers can force-disable the button. --- packages/bindx-ui/src/persist/persist-button.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/bindx-ui/src/persist/persist-button.tsx b/packages/bindx-ui/src/persist/persist-button.tsx index 558ba43..16e22d1 100644 --- a/packages/bindx-ui/src/persist/persist-button.tsx +++ b/packages/bindx-ui/src/persist/persist-button.tsx @@ -11,7 +11,7 @@ export interface PersistButtonProps extends ComponentProps { readonly onError?: () => void } -export function PersistButton({ label, className, onSuccess, onError, ...buttonProps }: PersistButtonProps): ReactNode { +export function PersistButton({ label, className, onSuccess, onError, disabled, ...buttonProps }: PersistButtonProps): ReactNode { const { persistAllWithFeedback, isPersisting, isDirty } = usePersistWithFeedback() const handleClick = useCallback(async (): Promise => { @@ -26,7 +26,7 @@ export function PersistButton({ label, className, onSuccess, onError, ...buttonP return (