Skip to content
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

Storybook CSS Prop Parsing #6853

Closed
JenniferMcIntyre-xyz opened this issue May 21, 2019 · 2 comments
Closed

Storybook CSS Prop Parsing #6853

JenniferMcIntyre-xyz opened this issue May 21, 2019 · 2 comments

Comments

@JenniferMcIntyre-xyz
Copy link

It looks like my storybook instance is not parsing the styles I have given it from emotion. See screenshot below. Does anyone know how to fix this?
Screen Shot 2019-05-21 at 3 32 04 PM

@hy2k
Copy link

hy2k commented Jun 2, 2019

I had a similar issue when I was using emotion with Gatsby. In my case, although I was using gatsby-plugin-emotion to parse styles, I also added .babelrc in .storybook/ directory which is in the project root. Now Storybook is parsing the styles correctly.

.storybook/.babelrc:

{
  "presets": ["@emotion/babel-preset-css-prop"]
}

I hope this solves your problem.

@JenniferMcIntyre-xyz
Copy link
Author

Thanks @hy2k! Unfortunately my company pivoted to docz instead. It met our needs a little more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants