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

fix: use classTarget when updating manager too #223

Closed airtonix closed 1 year ago

airtonix commented 1 year ago

fixes #174

seems like the moment you import any storybook-dark-mode into the preview side of things, updateManager is causes the body tag to have the classname put on it.

if we specify

export const parameters = {
  darkMode: {
      classTarget: 'html'
  },
};

Seems to me that what we really want is that only the html tag be manipulated.

hipstersmoothie commented 1 year ago

:rocket: PR was released in v3.0.0 :rocket: