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:
parent
476303f52b
commit
4b2fc6549a
1 changed files with 7 additions and 1 deletions
|
@ -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
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue