Files
managing-apps/src/Managing.WebApp/src/components/mollecules/ThemeSelector/ThemeSelector.tsx
alirehmani be59c0eb43 update
2024-05-10 17:51:20 +05:00

22 lines
484 B
TypeScript

import useTheme from '../../../hooks/useTheme'
const themes = ['black', 'coffee', 'cyberpunk', 'lofi', 'retro']
const ThemeSelector = (): JSX.Element => {
const { setTheme } = useTheme()
return (
<select
className="select w-full max-w-xs"
onChange={(event) => setTheme(event.target.value)}
>
{themes.map((item) => (
<option key={item} value={item}>
{item}
</option>
))}
</select>
)
}
export default ThemeSelector