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

⬆️ Styled components v6 #3050

Merged
merged 35 commits into from
Sep 18, 2023
Merged

⬆️ Styled components v6 #3050

merged 35 commits into from
Sep 18, 2023

Conversation

oddvernes
Copy link
Collaborator

@oddvernes oddvernes commented Sep 13, 2023

Resolves #2884

This was a big one.
styled changed from default to named import edit: this was not compatible with v5, so changing back and turning off the warning instead
They added types internally, deprecating @types/styled-components, but the types are not 1:1 and a bunch of types are missing. At least some of these will be added back in the next release of styled components though 🤷‍♂️.
Had to refactor how types are assigned to props on some components
Automatic filtering of props has been removed, so now every prop used in a styled component must be transient (have $ added to the front of it) otherwise it gets forwarded to the DOM as invalid props. I had to go through every component and detect all the props that needed to be transient.
All snapshots have changed since sc no longer adds vendor prefixes + some other changes due to new version of stylis formats css differently
Had to change many other tests too due to stylis not trimming spaces any more

@oddvernes oddvernes marked this pull request as ready for review September 15, 2023 12:12
Copy link
Contributor

@denektenina denektenina left a comment

Choose a reason for hiding this comment

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

LGTM

@oddvernes oddvernes merged commit 251ddef into develop Sep 18, 2023
3 checks passed
@oddvernes oddvernes deleted the OOVE/2884-styled-components-v6 branch September 18, 2023 12:20
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.

⬆️ Update styled-components to v6
2 participants