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
Describe the bug
When using Storybook, for some reason the colors in my theme.ts are not translated from blues.1000 for example to color: var(--theme-ui-colors-blues-1000, #12193F);.
If I use the same component in my Next/React app directly, the problem goes away.
If I downgrade ThemeUI all the way to 0.4.0-rc.14, the problem also goes away and it works in both Next/React and Storybook. I've tried ThemeUI version 0.9.1, and kept downgrading the minor version until I hit 0.4.0-rc.14, in which it worked.
To Reproduce
Steps to reproduce the behavior:
Use a color value like 'blues.1000' to give fill or border to a React component with SxStyleProps / ThemeUIStyleObject, corresponding to some blues.1000 defined color in your theme.ts
Use the component in Storybook.js (using version 6.2.9, the problem was also present with 6.0.21)
Notice that the color is not translated, and the CSS literally lists blues.1000 for the color when inspected in the browser
Downgrade ThemeUI to anything below 0.5.0
Restart Storybook
Notice the color translation works again.
Expected behavior
Would expect any version of ThemeUI to do correct color (or any token) resolving from its theme file, when loaded in Storybook.
The text was updated successfully, but these errors were encountered:
Both Theme UI and Storybook use Emotion, but they use different versions of it. (11 and 10, respectively). The problem occurs because since 0.5, Theme UI uses new Emotion, while Storybook still uses the old one. You can work around it by as described in #1530 (comment).
Describe the bug
When using Storybook, for some reason the colors in my theme.ts are not translated from
blues.1000
for example tocolor: var(--theme-ui-colors-blues-1000, #12193F);
.If I use the same component in my Next/React app directly, the problem goes away.
If I downgrade ThemeUI all the way to
0.4.0-rc.14
, the problem also goes away and it works in both Next/React and Storybook. I've tried ThemeUI version 0.9.1, and kept downgrading the minor version until I hit 0.4.0-rc.14, in which it worked.To Reproduce
Steps to reproduce the behavior:
'blues.1000'
to give fill or border to a React component withSxStyleProps
/ThemeUIStyleObject
, corresponding to someblues.1000
defined color in yourtheme.ts
blues.1000
for the color when inspected in the browserExpected behavior
Would expect any version of ThemeUI to do correct color (or any token) resolving from its theme file, when loaded in Storybook.
The text was updated successfully, but these errors were encountered: