-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
99 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import React from 'react'; | ||
import { ChakraProvider } from '@chakra-ui/react'; | ||
import theme from './theme'; | ||
import Navbar from './components/Navbar'; | ||
|
||
function App() { | ||
return ( | ||
<ChakraProvider theme={theme}> | ||
<Navbar /> | ||
{/* Rest of your app */} | ||
</ChakraProvider> | ||
); | ||
} | ||
|
||
export default App; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import React from 'react'; | ||
import { useColorMode, IconButton, useColorModeValue } from '@chakra-ui/react'; | ||
import { SunIcon, MoonIcon } from '@chakra-ui/icons'; | ||
|
||
function ColorModeToggle() { | ||
const { colorMode, toggleColorMode } = useColorMode(); | ||
const iconColor = useColorModeValue('gray.600', 'white'); | ||
|
||
return ( | ||
<IconButton | ||
icon={colorMode === 'light' ? <MoonIcon /> : <SunIcon />} | ||
onClick={toggleColorMode} | ||
variant="ghost" | ||
color={iconColor} | ||
aria-label={`Toggle ${colorMode === 'light' ? 'Dark' : 'Light'} Mode`} | ||
/> | ||
); | ||
} | ||
|
||
export default ColorModeToggle; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import Document, { Html, Head, Main, NextScript } from 'next/document' | ||
import { ColorModeScript } from '@chakra-ui/react' | ||
import theme from '../theme' | ||
|
||
class MyDocument extends Document { | ||
render() { | ||
return ( | ||
<Html lang="en"> | ||
<Head /> | ||
<body> | ||
<ColorModeScript initialColorMode={theme.config.initialColorMode} /> | ||
<Main /> | ||
<NextScript /> | ||
</body> | ||
</Html> | ||
) | ||
} | ||
} | ||
|
||
export default MyDocument |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters