Add dark mode option

This commit is contained in:
2026-02-01 20:06:27 +00:00
parent b67bfa7687
commit 3e3ca3621c
7 changed files with 114 additions and 15 deletions

View File

@@ -0,0 +1,29 @@
/**
* Theme Selector Component
*
* Provides UI for switching between light/dark/system theme modes.
* Uses shadcn/ui Select component.
*
* @author Andreas Weyer
* @license MIT
*/
import React from 'react';
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from './ui/select';
const ThemeSelector = ({ currentTheme, onThemeChange, t }: any) => {
return (
<Select value={currentTheme} onValueChange={onThemeChange}>
<SelectTrigger className="w-36">
<SelectValue />
</SelectTrigger>
<SelectContent>
<SelectItem value="light">{t('themeSelectorLight')}</SelectItem>
<SelectItem value="dark">{t('themeSelectorDark')}</SelectItem>
<SelectItem value="system">{t('themeSelectorSystem')}</SelectItem>
</SelectContent>
</Select>
);
};
export default ThemeSelector;