storybook-design-token
storybook-design-token copied to clipboard
Disabling addon panel does not work
Hello,
I've copied the code to disable the addon panel into ./storybook/preview.js as it appears in the documentation:
const preview = {
parameters: {
designToken: { disable: true },
}
}
However, the Design Tokens panel still appears on Stories.
Using version 3.0.0-beta.3 of this plugin, and Storybook version 7.4.2.
Thanks!
I've seen the same in 3.0.0-beta.5.
Same for 3.0.0-beta.6 here!
Any fix coming for this @Sqrrl ?
It seems to be an issue with the preview.js not exporting the object. I've adjusted the README accordingly. Adding export default preview; to your preview.js should fix it.
Disabling the panel works in 3.0.0-beta.7 with export default preview (I did not try previous versions).
But I get an anoying warning in the browser console:
Warning: The final argument passed to useMemo changed size between renders. The order and size of this array must remain constant.
Previous: [addon-controls, addon-controls, storybook/actions/panel, storybook-design-token/panel, storybook/interactions/panel]
Incoming: [addon-controls, addon-controls, storybook/actions/panel, storybook/interactions/panel]
I made a short screen capture. As you can see, the "Design Tokens" Tab is initially visible and disappears immediately.
https://github.com/UX-and-I/storybook-design-token/assets/31414552/5620d72f-97d3-4ede-acfc-1520002ef288
Disabling the panel works in 3.0.0-beta.7 with
export default preview(I did not try previous versions). But I get an anoying warning in the browser console:Warning: The final argument passed to useMemo changed size between renders. The order and size of this array must remain constant. Previous: [addon-controls, addon-controls, storybook/actions/panel, storybook-design-token/panel, storybook/interactions/panel] Incoming: [addon-controls, addon-controls, storybook/actions/panel, storybook/interactions/panel]I made a short screen capture. As you can see, the "Design Tokens" Tab is initially visible and disappears immediately.
storybook-design-token.mov
I've seen the same behaviour in previous beta versions as well, very annoying...
Seeing the same useMemo error. Is there a bug raised for this somewhere I can track / possibly contribute please?
Seeing the same useMemo error. Is there a bug raised for this somewhere I can track / possibly contribute please?
https://github.com/UX-and-I/storybook-design-token/issues/186