From 7c676479d45f68b2939bf4baba0d85e707e07b2a Mon Sep 17 00:00:00 2001 From: ItzCrazyKns Date: Sun, 2 Jun 2024 12:19:53 +0530 Subject: [PATCH] feat(theme-switcher): move to settings menu --- ui/components/SettingsDialog.tsx | 9 ++++++++- ui/components/Sidebar.tsx | 12 ++++------- ui/components/theme/Switcher.tsx | 34 +++++++++++--------------------- 3 files changed, 23 insertions(+), 32 deletions(-) diff --git a/ui/components/SettingsDialog.tsx b/ui/components/SettingsDialog.tsx index 8524aed..e932cee 100644 --- a/ui/components/SettingsDialog.tsx +++ b/ui/components/SettingsDialog.tsx @@ -8,6 +8,7 @@ import React, { useState, type SelectHTMLAttributes, } from 'react'; +import ThemeSwitcher from './theme/Switcher'; interface InputProps extends React.InputHTMLAttributes {} @@ -27,7 +28,7 @@ interface SelectProps extends SelectHTMLAttributes { options: { value: string; label: string; disabled?: boolean }[]; } -const Select = ({ className, options, ...restProps }: SelectProps) => { +export const Select = ({ className, options, ...restProps }: SelectProps) => { return ( handleThemeSwitch(e.target.value as Theme)} + options={[ + { value: 'light', label: 'Light' }, + { value: 'dark', label: 'Dark' } + ]} /> ); };