From 4b2fc6549a8bcf146ae5f70a67d08382263f2879 Mon Sep 17 00:00:00 2001 From: Joe Huss Date: Wed, 12 Jun 2024 21:12:21 -0400 Subject: [PATCH] Fixing build problem with ThemeSwitcher. Expanded on ItzCrazyKns/Perplexica#185 which seems to be incomplete. he created the interface but never implemented it. --- ui/components/theme/Switcher.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ui/components/theme/Switcher.tsx b/ui/components/theme/Switcher.tsx index 22e2ecc..665e171 100644 --- a/ui/components/theme/Switcher.tsx +++ b/ui/components/theme/Switcher.tsx @@ -7,7 +7,12 @@ import { Select } from '../SettingsDialog'; type Theme = 'dark' | 'light' | 'system'; -const ThemeSwitcher = ({ className }: { className?: string }) => { +interface ThemeSwitcherProps { + className?: string; + size?: number; // Added size prop +} + +const ThemeSwitcher = ({ className, size }: ThemeSwitcherProps) => { const [mounted, setMounted] = useState(false); const { theme, setTheme } = useTheme(); @@ -55,6 +60,7 @@ const ThemeSwitcher = ({ className }: { className?: string }) => { { value: 'light', label: 'Light' }, { value: 'dark', label: 'Dark' } ]} + size = {size} // Added size prop /> ); };