[dyad] Refactoring the app for modularity - wrote 12 file(s)

This commit is contained in:
[dyad]
2026-01-18 16:22:20 +01:00
parent 69a9b62da8
commit d33dceb08c
12 changed files with 1052 additions and 889 deletions

View File

@@ -0,0 +1,39 @@
"use client";
import { Button } from "@/components/ui/button";
import { Check, RotateCcw } from "lucide-react";
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip";
import { toast } from "sonner";
interface ActionButtonsProps {
onReset: () => void;
}
export function ActionButtons({ onReset }: ActionButtonsProps) {
const handleApply = () => {
toast.info("Settings updated and will be used for all downloads.");
};
return (
<TooltipProvider>
<div className="flex items-center gap-2">
<Tooltip>
<TooltipTrigger asChild>
<Button onClick={onReset} className="w-full" variant="outline">
<RotateCcw className="mr-2 h-4 w-4" /> Reset
</Button>
</TooltipTrigger>
<TooltipContent><p>Reset all settings to their default values.</p></TooltipContent>
</Tooltip>
<Tooltip>
<TooltipTrigger asChild>
<Button onClick={handleApply} className="w-full">
<Check className="mr-2 h-4 w-4" /> Apply
</Button>
</TooltipTrigger>
<TooltipContent><p>Confirm and apply all the settings above. This does not download the images.</p></TooltipContent>
</Tooltip>
</div>
</TooltipProvider>
);
}