Fixing build problem with ThemeSwitcher. Expanded on ItzCrazyKns/Perplexica#185 which seems to be incomplete. he created the interface but never implemented it.

This commit is contained in:
Joe Huss 2024-06-12 21:12:21 -04:00
parent 476303f52b
commit 4b2fc6549a

View file

@ -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
/>
);
};