We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4bb5b51 commit c8748fbCopy full SHA for c8748fb
1 file changed
components/Navigation/index.jsx
@@ -12,7 +12,7 @@ import Logo from '#theme/Logo';
12
* NavBar component that displays the headings, search, etc.
13
*/
14
export default ({ metadata }) => {
15
- const [theme, toggleTheme] = useTheme();
+ const [themePreference, setThemePreference] = useTheme();
16
17
return (
18
<NavBar
@@ -38,8 +38,8 @@ export default ({ metadata }) => {
38
>
39
<SearchBox pathname={metadata.path} />
40
<ThemeToggle
41
- onClick={toggleTheme}
42
- aria-label={`Switch to ${theme === 'light' ? 'dark' : 'light'} theme`}
+ onChange={setThemePreference}
+ currentTheme={themePreference}
43
/>
44
<a
45
href={`https://github.com/nodejs/learn`}
0 commit comments