-
Notifications
You must be signed in to change notification settings - Fork 646
chore: use styled wrapper instead of Box #6962
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
Conversation
🦋 Changeset detectedLatest commit: 894e600 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
|
👋 Hi from github/github-ui! Your integration PR is ready: https://github.com/github/github-ui/pull/4053 |
|
🔴 ci completed with status |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR replaces the Box wrapper with styled() wrapper for three components (Label, Spinner, and Token) in the @primer/styled-react package to fix an issue where the size prop was being overridden by styled-system theme causing unintended styles.
- Refactored Token component from manual sx prop handling to styled-components wrapper
- Simplified Spinner component from Box wrapper to direct styled-components wrapper
- Updated Label component to use styled() instead of Box wrapper
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/styled-react/src/components/Token.tsx | Replaced manual sx prop handling with styled-components wrapper, simplified implementation |
| packages/styled-react/src/components/Spinner.tsx | Changed from Box wrapper to direct styled-components wrapper |
| packages/styled-react/src/components/Label.tsx | Updated to use styled() instead of Box wrapper |
| .changeset/purple-waves-pay.md | Added changeset entry for patch release |
Fixes issue where size=... prop was being overriden by styled-system theme and causing unintended styles
Changelog
Changed
Rollout strategy
Testing & Reviewing
Merge checklist