Closed schickling closed 3 years ago
Currently prefersDark is a const as defined here: https://github.com/hipstersmoothie/storybook-dark-mode/blob/master/src/Tool.tsx#L35
prefersDark
const
This leads to errors in non-browser contexts. Example:
I'd suggest to make prefersDark a lazily invoked function.
Turns out https://github.com/hipstersmoothie/storybook-dark-mode/issues/132 fixes this.
Currently
prefersDark
is aconst
as defined here: https://github.com/hipstersmoothie/storybook-dark-mode/blob/master/src/Tool.tsx#L35This leads to errors in non-browser contexts. Example:
I'd suggest to make
prefersDark
a lazily invoked function.