diff --git a/src/App.tsx b/src/App.tsx index bd6d1c5..3630cd3 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -13,11 +13,11 @@ function App() { - + Aside - + Main diff --git a/src/components/ColorModeSwitch.tsx b/src/components/ColorModeSwitch.tsx new file mode 100644 index 0000000..1fa02cc --- /dev/null +++ b/src/components/ColorModeSwitch.tsx @@ -0,0 +1,14 @@ +import { HStack, Switch, Text, useColorMode } from '@chakra-ui/react' + +const ColorModeSwitch = () => { + const {toggleColorMode, colorMode} = useColorMode(); + + return ( + + + Dark Mode + + ) +} + +export default ColorModeSwitch \ No newline at end of file diff --git a/src/components/NavBar.tsx b/src/components/NavBar.tsx index a08ab81..c7eff32 100644 --- a/src/components/NavBar.tsx +++ b/src/components/NavBar.tsx @@ -1,11 +1,12 @@ -import { HStack, Image, Text } from '@chakra-ui/react' +import { HStack, Image } from '@chakra-ui/react' import logo from '../assets/logo.webp'; +import ColorModeSwitch from './ColorModeSwitch'; const NavBar = () => { return ( - + - NavBar + ) }