Open monfera opened 4 years ago
Would #101 work for you (dark/light class on the preview iframe <body>
)?
I think it should solve this
It does assume css though
There are two ways to accomplish this
DARK_MODE
eventDoes the events API satisfy your needs?
stylePreview seems to not be working
PRs welcome!
The core functionality of toggling dark mode works great, thanks!
For story integration, the current
README
assumes CSS and React: it hinges on custom theme providers and the code example shows a React component that gets notified via a hook.It would be great if stories knew if the current mode is light or dark mode, for example, as if it were a knob, irrespective of how the story responds (it may not be CSS - it may be a
Canvas2d
redraw) and what framework one is using (eg. none). Is it supported?