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

Fix styled-components integration in new Storybook #2693

Merged
merged 1 commit into from
Jan 22, 2024

Conversation

CarlosCortizasCT
Copy link
Contributor

@CarlosCortizasCT CarlosCortizasCT commented Jan 19, 2024

Summary

Fix styled-components integration in new Storybook

Description

We currently have a problem when trying to render a story which includes a component using styled component component selectors:

Error: Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.

Screenshot 2024-01-19 at 12 25 26

After some research I found here something helpful which states we need to remove the default Storybook react babel plugin and add it again include the babel-emotion plugin.

I also took the opportunity to update Storybook to the latest version.

Copy link

changeset-bot bot commented Jan 19, 2024

⚠️ No Changeset found

Latest commit: a53ad95

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Jan 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
ui-kit ❌ Failed (Inspect) Jan 19, 2024 11:34am

@CarlosCortizasCT CarlosCortizasCT requested a review from a team January 19, 2024 11:35
Copy link
Contributor

@kark kark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 🙌 Super cool you made it work!

@CarlosCortizasCT CarlosCortizasCT merged commit 76fcfa3 into cm-update-storybook Jan 22, 2024
1 of 3 checks passed
@CarlosCortizasCT CarlosCortizasCT deleted the cm-fix-storybook-emotion branch January 22, 2024 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants