Skip to content

Update Styled Components to V6 #1695

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

Merged
merged 9 commits into from
Apr 30, 2024

Conversation

christiancp100
Copy link
Contributor

@christiancp100 christiancp100 commented Apr 18, 2024

What does it do?

  • Updates styled-components peer dep & local dep from v5 to v6
  • Changes Box/Grid/Flex & Typography to react components over styled-components
  • Disallow use of as and instead use the tag prop to change underlying DOM element
  • Default color of Typography is currentColor similar to SVGs

Why is it needed?

  • Keep the design-system dependencies updated
  • Integrate inbuilt type system from styled-components

Related issue(s)/PR(s)

  • resolves DX-1188

@christiancp100 christiancp100 added pr: chore This PR contains chore tasks (cleanups, configs, tooling...) source: dependencies relates to dependencies within the repo labels Apr 18, 2024
@christiancp100 christiancp100 self-assigned this Apr 18, 2024
Copy link

changeset-bot bot commented Apr 18, 2024

🦋 Changeset detected

Latest commit: 2a0e15f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@strapi/design-system Major
@strapi/icons Major
@strapi/ui-primitives Major

Not sure what this means? Click here to learn what changesets are.

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

Copy link

vercel bot commented Apr 18, 2024

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

Name Status Preview Comments Updated (UTC)
design_system_v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 29, 2024 9:01am
design-system ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 29, 2024 9:01am
design-system-website ❌ Failed (Inspect) Apr 29, 2024 9:01am

@christiancp100 christiancp100 changed the base branch from develop to releases/2.0.0 April 18, 2024 13:00

This comment was marked as spam.

@joshuaellis

This comment was marked as outdated.

@joshuaellis
Copy link
Contributor

Okay I think this is good to go, to solve a lot of the issues we had around how as and forwardAs behaves, i've just made the tag prop, also benefit is it's not tied to the styling library should we choose to change in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flag: 💥 Breaking change This PR contains breaking changes and should not be merged pr: chore This PR contains chore tasks (cleanups, configs, tooling...) source: dependencies relates to dependencies within the repo
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug]: Components using as prop do not have said prop's components inferred [chore]: Stop using shouldForwardProp and just use $ for simplicity
2 participants