style: 完成所有文件的lint

This commit is contained in:
claude-code-best
2026-05-01 21:39:30 +08:00
parent d136872cc9
commit 6182015005
1333 changed files with 68255 additions and 77882 deletions

View File

@@ -1,17 +1,12 @@
import { Moon, Sun, Monitor } from "lucide-react";
import { useTheme, type Theme } from "../../src/lib/theme";
import { Button } from "./button";
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuTrigger,
} from "./dropdown-menu";
import { Moon, Sun, Monitor } from 'lucide-react';
import { useTheme, type Theme } from '../../src/lib/theme';
import { Button } from './button';
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from './dropdown-menu';
const themeOptions: { value: Theme; label: string; icon: React.ReactNode }[] = [
{ value: "light", label: "Light", icon: <Sun className="h-4 w-4" /> },
{ value: "dark", label: "Dark", icon: <Moon className="h-4 w-4" /> },
{ value: "system", label: "System", icon: <Monitor className="h-4 w-4" /> },
{ value: 'light', label: 'Light', icon: <Sun className="h-4 w-4" /> },
{ value: 'dark', label: 'Dark', icon: <Moon className="h-4 w-4" /> },
{ value: 'system', label: 'System', icon: <Monitor className="h-4 w-4" /> },
];
export function ThemeToggle() {
@@ -21,20 +16,16 @@ export function ThemeToggle() {
<DropdownMenu>
<DropdownMenuTrigger asChild>
<Button variant="ghost" size="icon" className="h-8 w-8">
{resolvedTheme === "dark" ? (
<Moon className="h-4 w-4" />
) : (
<Sun className="h-4 w-4" />
)}
{resolvedTheme === 'dark' ? <Moon className="h-4 w-4" /> : <Sun className="h-4 w-4" />}
<span className="sr-only">Toggle theme</span>
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent align="end">
{themeOptions.map((option) => (
{themeOptions.map(option => (
<DropdownMenuItem
key={option.value}
onClick={() => setTheme(option.value)}
className={theme === option.value ? "bg-accent" : ""}
className={theme === option.value ? 'bg-accent' : ''}
>
{option.icon}
<span className="ml-2">{option.label}</span>
@@ -44,4 +35,3 @@ export function ThemeToggle() {
</DropdownMenu>
);
}