Closed sgoodluck closed 1 year ago
Any updates on this one? I'm also running into the same error. I'm also seeing this in the below in the console. Maybe its helpful.
preview.mjs:55 Reached maximum of 1000 pseudo selectors per sheet, skipping the rest.
axe.js:11387 Canvas2D: Multiple readback operations using getImageData are faster with the willReadFrequently attribute set to true. See: https://html.spec.whatwg.org/multipage/canvas.html#concept-canvas-will-read-frequently
I've managed to get it working defining pseudo as a global type:
// preview.ts/js
const preview: Preview = {
globalTypes: {
pseudo: {}
},
...
};
export default preview;
@srMarquinho tried that approach with luck. I do have a different error now:
Uncaught TypeError: Cannot read properties of null (reading 'className')
at applyClasses (withPseudoState.js:12:1)
at withPseudoState.js:33:1
at Map.forEach (<anonymous>)
at applyParameter (withPseudoState.js:30:1)
at withPseudoState.js:80:1
@srMarquinho tried that approach with luck. I do have a different error now:
Uncaught TypeError: Cannot read properties of null (reading 'className') at applyClasses (withPseudoState.js:12:1) at withPseudoState.js:33:1 at Map.forEach (<anonymous>) at applyParameter (withPseudoState.js:30:1) at withPseudoState.js:80:1
@richbachman Unfortunately I did not see that. I'm on:
"storybook": "^7.0.0-rc.10",
"storybook-addon-pseudo-states": "^2.0.0-next.3",
@srMarquinho the 2.0.0-next.3
version was the ticket. Thanks for the tip!
It works with version 2.0.1
now as well.
Kudos to @srMarquinho, I was stumped with this error until I found this issue.
Just to clarify, the warning is still being shown. If any add-on author knows how to register globals from within add-on code, could you please provide an example?
Looks like this issue can be closed! Thanks @yasnbouz for writing a fix!
When spinning up storybook 7.0.0 (beta) I'm unable to use this package successfully. Any attempt to use the menu results in the above console output.
Would love any recommendations!