add loader to button text when form is submitted

This commit is contained in:
Daniel Roth 2026-03-03 11:30:57 +00:00
parent a133833928
commit 12fed5ae82

View file

@ -9,6 +9,7 @@ import { Checkbox } from "@/app/shadcn_components/ui/checkbox";
import { Label } from "@/app/shadcn_components/ui/label";
import { GripVertical } from "lucide-react";
import { HelpCircle } from "lucide-react";
import { Loader2 } from "lucide-react";
import {
Tooltip,
TooltipContent,
@ -290,7 +291,10 @@ export function RecommendationsOptions({
Cancel
</Button>
<Button size="sm" onClick={handleSubmit} disabled={isApplying}>
Submit
<span className="flex items-center gap-2">
{isApplying && <Loader2 className="h-4 w-4 animate-spin" />}
Submit
</span>
</Button>
</div>
</DropdownMenuContent>