-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@react-theming/storybook-addon errors #25677
Comments
Did you find a solution? |
I had a look at the issue. The issue is with: import { withThemes } from '@react-theming/storybook-addon'; For a reason I fail to understand (iframe communication security?), the theme is going through a serialization process that doesn't support functions: storybookjs/telejson#16. So you have to serialize something else. |
Just noting that I'm running into this problem too with The problem I'm running into is that the theme functions like
|
We've chatted in the other thread (storybookjs/telejson#16), but from what I understand, I wouldn't classify this as an MUI bug - it's more an issue with storybook addon(s) - though it's not yet clear exactly which one(s). |
Current Behavior 😯
When using Material-UI v5 within Storybook v6.2.5, using the
<Grid>
component errors:ReferenceError: values is not defined
Expected Behavior 🤔
The
<Grid>
component on v5 should not error within Storybook.Steps to Reproduce 🕹
Steps:
yarn storybook
Design System/Organisms/Broken
story returns the above stack trace on a simple<Grid>
componentDesign System/Organisms/Working
story, which uses<Box>
works fineContext 🔦
I'm building an application based off
create-react-app
with MUIv5 with storybook providing a shareable design system.I think this is likely related to #24282. I tried the fix in #24282 (comment) which results in other components (such as
Box
) to have the same error.It could well be how I've implemented
ThemeProvider
for storybook, or how i've created the custom theme, but I think I'm following other people's implementation correctly.Your Environment 🌎
`npx @material-ui/envinfo`
The text was updated successfully, but these errors were encountered: