Uh oh!
There was an error while loading. Please reload this page.
Adapt Button to styled-react and remove sx - #6904
Conversation
🦋 Changeset detectedLatest commit: e4ea9fe The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
There was a problem hiding this comment.
Pull Request Overview
This PR adapts the Button component to the styled-react package and removes the sx prop implementation from the main @primer/react package. The changes introduce custom styled-react implementations for Button, IconButton, and ActionMenu components that support the SxProp interface for backward compatibility.
Key changes:
- Creates new styled-react wrapper components for Button, ActionMenu, and IconButton
- Moves CSSCustomProperties type to a shared location in sx.ts
- Updates package exports to use the new styled-react implementations
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/styled-react/src/sx.ts | Adds CSSCustomProperties type export for shared use |
| packages/styled-react/src/index.tsx | Updates exports to use new styled-react components instead of direct @primer/react exports |
| packages/styled-react/src/components/PageHeader.tsx | Updates import to use shared CSSCustomProperties type |
| packages/styled-react/src/components/IconButton.tsx | Creates new styled-react wrapper for IconButton with sx prop support |
| packages/styled-react/src/components/Button.tsx | Creates new styled-react wrapper for Button with custom sx prop handling |
| packages/styled-react/src/components/ActionMenu.tsx | Creates new styled-react wrapper for ActionMenu with sx prop support |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
👋 Hi, this pull request contains changes to the source code that github/github depends on. If you are GitHub staff, we recommend testing these changes with github/github using the integration workflow. Thanks! |
👋 Hi, there are new commits since the last successful integration test. We recommend running the integration workflow once more, unless you are sure the new changes do not affect github/github. Thanks! |
👋 Hi, there are new commits since the last successful integration test. We recommend running the integration workflow once more, unless you are sure the new changes do not affect github/github. Thanks! |
👋 Hi, there are new commits since the last successful integration test. We recommend running the integration workflow once more, unless you are sure the new changes do not affect github/github. Thanks! |
👋 Hi, there are new commits since the last successful integration test. We recommend running the integration workflow once more, unless you are sure the new changes do not affect github/github. Thanks! |
👋 Hi, there are new commits since the last successful integration test. We recommend running the integration workflow once more, unless you are sure the new changes do not affect github/github. Thanks! |
👋 Hi, there are new commits since the last successful integration test. We recommend running the integration workflow once more, unless you are sure the new changes do not affect github/github. Thanks! |
👋 Hi, there are new commits since the last successful integration test. We recommend running the integration workflow once more, unless you are sure the new changes do not affect github/github. Thanks! |
👋 Hi, there are new commits since the last successful integration test. We recommend running the integration workflow once more, unless you are sure the new changes do not affect github/github. Thanks! |
👋 Hi, there are new commits since the last successful integration test. We recommend running the integration workflow once more, unless you are sure the new changes do not affect github/github. Thanks! |
👋 Hi, there are new commits since the last successful integration test. We recommend running the integration workflow once more, unless you are sure the new changes do not affect github/github. Thanks! |
👋 Hi, there are new commits since the last successful integration test. We recommend running the integration workflow once more, unless you are sure the new changes do not affect github/github. Thanks! |
🔴 ci completed with status |
francinelucca
commented
Oct 11, 2025
integration failures are present on main, should be fixed by #6986 and are independent of these changes, merging |
Closes#6760
Current
sxusage:Button: 107
IconButton: 32
✅
sxusages are only in repos other than github-ui; those usages have been added to the tracking issueChangelog
Removed
Remove support for
sxfrom theButton,IconButtoncomponents, and associated stories, docs, and testsRollout strategy
Testing & Reviewing
Merge checklist