Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/bright-themes-guess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@nodejs/doc-kit-generator-react': patch
---

Show the active light or dark theme icon when the system preference is selected.
4 changes: 2 additions & 2 deletions packages/react/src/html/ui/components/ThemeToggle.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import withIsland from '../islands/withIsland.jsx';
* Theme switcher.
*/
const Toggle = () => {
const [themePreference, setThemePreference] = useTheme();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems like an unrelate rename.

const [currentTheme, setThemePreference] = useTheme();

return (
<ThemeToggle onChange={setThemePreference} currentTheme={themePreference} />
<ThemeToggle onChange={setThemePreference} currentTheme={currentTheme} />
);
};

Expand Down