Skip to content

Commit e6da5f7

Browse files
plmrrystyfle
andauthored
Export <ThemeScript> (#355)
* Add opt-out of script insertion from provider, various type updates, avoid `disableAnimation` if not needed * reduce formatting diffs * reduce more formatting diffs * handle multiple attributes in `isThemeCurrentTheme` * export <ThemeScript /> * Update types.ts * Update index.tsx Co-authored-by: Steven <steven@ceriously.com> * reduce diff; make script id optional * reduce the diff * revert more changes * more diff reduction * reduce the diff again * pass optional ID from parent * remove unnecessary id * add tests of `withScript=false` and manual `<ThemeScript>` insertion * formatting * more formatting tweaks * remove useless test * remove more attributes before each test * move `withScript` test * remove stuff from previous PR * remove test from previous PR * remove more stuff from previous PR * add line break * remove whitespace --------- Co-authored-by: Steven <steven@ceriously.com>
1 parent c89d019 commit e6da5f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

next-themes/src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ const Theme = ({
184184
)
185185
}
186186

187-
const ThemeScript = React.memo(
187+
export const ThemeScript = React.memo(
188188
({
189189
forcedTheme,
190190
storageKey,

0 commit comments

Comments
 (0)