refactor: enhance button loading states in various components for improved user experience

This commit is contained in:
Anish Sarkar 2026-03-29 16:26:31 +05:30
parent 75fd39c249
commit fec5c005eb
6 changed files with 42 additions and 91 deletions

View file

@ -807,9 +807,10 @@ export function DocumentsSidebar({
handleBulkDeleteSelected();
}}
disabled={isBulkDeleting}
className="bg-destructive text-destructive-foreground hover:bg-destructive/90"
className="relative bg-destructive text-destructive-foreground hover:bg-destructive/90"
>
{isBulkDeleting ? <Spinner size="sm" /> : "Delete"}
<span className={isBulkDeleting ? "opacity-0" : ""}>Delete</span>
{isBulkDeleting && <Spinner size="sm" className="absolute" />}
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>