chromaui / storybook-addon-pseudo-states

CSS pseudo-classes for Storybook
MIT License
90 stars 31 forks source link

Add support for Storybook 7.0 root element #46

Closed ghengeveld closed 1 year ago

ghengeveld commented 1 year ago

Storybook 7.0 uses #storybook-root rather than #root as the root element. This update adds support for #storybook-root while maintaining backwards compatibility. Also this simplifies how classes are added/removed.

Fixes #42

📦 Published PR as canary version: 1.15.3--canary.46.223ff80.0
:sparkles: Test out this PR locally via: ```bash npm install storybook-addon-pseudo-states@1.15.3--canary.46.223ff80.0 # or yarn add storybook-addon-pseudo-states@1.15.3--canary.46.223ff80.0 ```
linear[bot] commented 1 year ago
AP-2628 Pseudo States addon Storybook 7 support

[https://github.com/chromaui/storybook-addon-pseudo-states/issues/42](https://github.com/chromaui/storybook-addon-pseudo-states/issues/42) Storybook 7 changed the root element ID from `#root` to `#storybook-root`, which the pseudo-states addon does not support. We need to fix this.