From 25fdd98daf7877afd0f2ab4a7f1e760e21361dc7 Mon Sep 17 00:00:00 2001 From: aidanCQ Date: Wed, 20 Dec 2023 16:55:18 +0000 Subject: [PATCH] feat(): Use icon button for theme selector. --- src/molecules/theme-selector.tsx | 40 +++++++++++++++++--------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/src/molecules/theme-selector.tsx b/src/molecules/theme-selector.tsx index 8914a0a..4602503 100644 --- a/src/molecules/theme-selector.tsx +++ b/src/molecules/theme-selector.tsx @@ -1,8 +1,8 @@ 'use client' import { ComputerIcon, MoonIcon, SunIcon } from "lucide-react"; import React from "react"; +import { Button } from "src/atoms/button"; import { theme as _theme } from "src/utils"; -import { ToggleGroup, ToggleGroupItem } from "../atoms/toggle-group"; export const useTheme = () => { const [theme, _setTheme] = React.useState>({mode: 'system', isDark: false}); @@ -15,23 +15,25 @@ export const useTheme = () => { return { theme, setMode: _theme.set }; }; export const ThemeSelector = (props: ReturnType) => { + const stateMap = { + "light": { + icon: , + }, + "dark": { + icon: + }, + "system": { + icon: , + }, + } satisfies Record return ( - - props.setMode(mode) - } - value={props.theme.mode} - > - - - - - - - - - - - ); + + ) + };