File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import { DesktopNav } from '@/components/desktop-nav'
22import { Link } from '@/components/mdx'
33import { MobileNav } from '@/components/mobile-nav'
44import { menuItems } from '@/data/menu-items'
5- import { CloseIcon , HamburgerIcon } from '@chakra-ui/icons'
5+ import { CloseIcon , HamburgerIcon , MoonIcon , SunIcon } from '@chakra-ui/icons'
66import {
77 Box ,
88 Container ,
@@ -95,6 +95,13 @@ export const Header = () => {
9595 navItems = { navItems }
9696 display = { { base : 'none' , md : 'flex' } }
9797 />
98+ < IconButton
99+ aria-label = { `Switch to ${ colorMode === 'light' ? 'dark' : 'light' } mode` }
100+ icon = { colorMode === 'light' ? < MoonIcon /> : < SunIcon /> }
101+ onClick = { toggleColorMode }
102+ variant = { 'ghost' }
103+ size = { 'sm' }
104+ />
98105 </ Stack >
99106 </ Container >
100107 </ Flex >
Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ import { ChakraProvider } from '@chakra-ui/react'
44import { useRouter } from 'next/router'
55import Script from 'next/script'
66import { useEffect } from 'react'
7- import { ColorModeToggle } from '@/components/ColorModeToggle'
87
98function MyApp ( { Component, pageProps } ) {
109 const router = useRouter ( )
@@ -42,7 +41,6 @@ function MyApp({ Component, pageProps }) {
4241 } }
4342 />
4443
45- < ColorModeToggle />
4644 < Component { ...pageProps } />
4745 </ ChakraProvider >
4846 )
You can’t perform that action at this time.
0 commit comments