hipstersmoothie / storybook-dark-mode

A storybook addon that lets your users toggle between dark and light mode.
MIT License
429 stars 56 forks source link

classTarget not updating preview node in storybook v7 #215

Closed redonkulus closed 1 year ago

redonkulus commented 1 year ago

Recently updated to storybook v7 with the latest version of storybook-dark-mode. In storybook v6, when clicking the dark mode toggle icon, the preview iframe node specified via the classTarget option would update the class of the element. In v7, this no longer happens.

No error message displays in the browser console. Has storybook v7 been tested with this library yet?

My config:

darkMode: {
  classTarget: 'html',
  stylePreview: true
},
hipstersmoothie commented 1 year ago

I don't think the plugin is working at all in v7. closing in favor #205

redonkulus commented 1 year ago

@hipstersmoothie most of the plugin works for me except this one issue. So I'm not sure its related to that other issue, I haven't seen that problem.