mirror of
https://github.com/skidoodle/erettsegi-browser.git
synced 2026-04-28 13:37:35 +02:00
update
This commit is contained in:
@@ -1,21 +1,21 @@
|
||||
import { VscColorMode } from 'react-icons/vsc'
|
||||
import { Button } from '@nextui-org/button'
|
||||
import { useTheme } from 'next-themes'
|
||||
import { Button } from "@heroui/button";
|
||||
import { useTheme } from "next-themes";
|
||||
import { VscColorMode } from "react-icons/vsc";
|
||||
|
||||
export const ThemeSwitcher = () => {
|
||||
const { theme, setTheme } = useTheme()
|
||||
const { theme, setTheme } = useTheme();
|
||||
|
||||
const toggle = () => {
|
||||
setTheme(theme === 'light' ? 'dark' : 'light')
|
||||
}
|
||||
const toggle = () => {
|
||||
setTheme(theme === "light" ? "dark" : "light");
|
||||
};
|
||||
|
||||
return (
|
||||
<Button aria-label='Switch Theme' size='sm' onClick={() => toggle()}>
|
||||
{theme === 'light' ? (
|
||||
<VscColorMode style={{ fill: 'black' }} size={20} />
|
||||
) : (
|
||||
<VscColorMode size={20} key={'dark'} />
|
||||
)}
|
||||
</Button>
|
||||
)
|
||||
}
|
||||
return (
|
||||
<Button aria-label="Switch Theme" size="sm" onPress={() => toggle()}>
|
||||
{theme === "light" ? (
|
||||
<VscColorMode style={{ fill: "black" }} size={20} />
|
||||
) : (
|
||||
<VscColorMode size={20} key={"dark"} />
|
||||
)}
|
||||
</Button>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user