Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
import { Label } from "@/components/ui/label";
import { Switch } from "@/components/ui/switch";
import { useTheme } from "@/components/theme-provider";
import { Moon, Sun, Palette } from "lucide-react";
export function Settings() {
const { theme, toggleTheme } = useTheme();
return (
<div className="p-6 space-y-6 max-w-2xl">
<div>
<h1 className="text-3xl font-semibold" data-testid="text-settings-title">
Settings
</h1>
<p className="text-muted-foreground mt-1">
Customize your resolution tracker experience
</p>
</div>
<Card className="border-card-border">
<CardHeader>
<div className="flex items-center gap-3">
<div className="p-2 rounded-md bg-primary/10">
<Palette className="h-5 w-5 text-primary" />
</div>
<div>
<CardTitle>Appearance</CardTitle>
<CardDescription>Customize how the app looks</CardDescription>
</div>
</div>
</CardHeader>
<CardContent className="space-y-4">
<div className="flex items-center justify-between">
<div className="flex items-center gap-3">
{theme === "dark" ? (
<Moon className="h-5 w-5 text-muted-foreground" />
) : (
<Sun className="h-5 w-5 text-muted-foreground" />
)}
<div>
<Label htmlFor="dark-mode" className="text-base">Dark Mode</Label>
<p className="text-sm text-muted-foreground">
Toggle between light and dark themes
</p>
</div>
</div>
<Switch
id="dark-mode"
checked={theme === "dark"}
onCheckedChange={toggleTheme}
data-testid="switch-dark-mode"
/>
</div>
</CardContent>
</Card>
<Card className="border-card-border">
<CardHeader>
<CardTitle>About</CardTitle>
<CardDescription>Resolution Tracker v1.0</CardDescription>
</CardHeader>
<CardContent>
<p className="text-sm text-muted-foreground">
Track your personal resolutions, set milestones, and monitor your progress throughout the year.
Stay motivated and achieve your goals with consistent check-ins and visual progress tracking.
</p>
</CardContent>
</Card>
</div>
);
}
|