diff --git a/.changeset/fluffy-news-tan.md b/.changeset/fluffy-news-tan.md new file mode 100644 index 000000000..c7e1c8f64 --- /dev/null +++ b/.changeset/fluffy-news-tan.md @@ -0,0 +1,5 @@ +--- +'@myst-theme/providers': patch +--- + +Make theme optional on ThemeProvider diff --git a/packages/providers/src/theme.tsx b/packages/providers/src/theme.tsx index e438e5a4b..3d77555aa 100644 --- a/packages/providers/src/theme.tsx +++ b/packages/providers/src/theme.tsx @@ -60,14 +60,14 @@ const prefersLightMQ = '(prefers-color-scheme: light)'; export function ThemeProvider({ children, - theme: startingTheme, + theme: startingTheme = Theme.light, renderers, Link, top, NavLink, }: { children: React.ReactNode; - theme: Theme | null; + theme?: Theme; renderers?: Record; Link?: Link; top?: number;