import { MonitorIcon, MoonIcon, SunIcon } from "lucide-react" import type { I18nDevtoolTheme } from "./devtool-preferences" import { useDevtoolLocalization } from "./devtool-localization" export interface DevtoolThemeSwitcherProps { onThemeChange: (theme: I18nDevtoolTheme) => void theme: I18nDevtoolTheme } const themes = [ { accessibleLabel: "autoTheme", icon: MonitorIcon, label: "auto", value: "auto", }, { accessibleLabel: "lightTheme", icon: SunIcon, label: "light", value: "light", }, { accessibleLabel: "darkTheme", icon: MoonIcon, label: "dark", value: "dark", }, ] as const export function DevtoolThemeSwitcher({ onThemeChange, theme, }: DevtoolThemeSwitcherProps) { const { messages } = useDevtoolLocalization() return (
{themes.map(({ accessibleLabel, icon: ThemeIcon, label, value }) => ( ))}
) }