You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This works in regular usages, but on Storybook (with the addon) the aliases keys are stripped down and all we're getting is the numeric indexes:
['12','16,''20'];
When debugging, I saw that initially, we have those aliases, but on rerender (on the 2nd hit of the debugger, which occurs immediately) the aliases disappear.
Any idea why this is happening?
The text was updated successfully, but these errors were encountered:
@Ptichi I didn't clearly get the problem. ['12', '16,' '20']; - isn't this what you expected to get?
Try to consider that the theme object you see in the theme panel is serialized when passing between theme provider and panel. You can lost some fields on serialization. In general, the best way to solve the issues like this is to pass to addon only a plain JS object and then reconstruct a theme via a custom providerFn function. See https://github.com/react-theming/storybook-addon#using-with-material-ui example
We're using themes according to styled-system theme specification: https://styled-system.com/theme-specification#scale-aliases
For example, we define fields like this, which combines numeric indexes with string keys as aliases:
This works in regular usages, but on Storybook (with the addon) the aliases keys are stripped down and all we're getting is the numeric indexes:
When debugging, I saw that initially, we have those aliases, but on rerender (on the 2nd hit of the debugger, which occurs immediately) the aliases disappear.
Any idea why this is happening?
The text was updated successfully, but these errors were encountered: