Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 677
Remove sx from the SegmentedControl component#6741
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
Uh oh!
There was an error while loading. Please reload this page.
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
1df14c5
remove sx and box
liuliu-dev 3985a24
changeset
liuliu-dev a4d0efe
remove sx test
liuliu-dev 637b0d3
Merge remote-tracking branch 'origin/main' into liuliu/remove-sx-from…
liuliu-dev e897ebf
Merge branch 'main' into liuliu/remove-sx-from-segmentcontrol
liuliu-dev 424c9f8
Merge remote-tracking branch 'origin/main' into liuliu/remove-sx-from…
liuliu-dev 0edc542
wrap segmentedcontrol in styled-react
liuliu-dev e633c32
Merge branch 'liuliu/remove-sx-from-segmentcontrol' of https://github…
liuliu-dev 4533599
format
liuliu-dev 9acfdf5
PropsWithChildren, update test
liuliu-dev df2b09a
Merge branch 'main' into liuliu/remove-sx-from-segmentcontrol
liuliu-dev daec3e0
add more sx tests for SegmentedControl
liuliu-dev a896ef4
format
liuliu-dev 0b24ec2
fix lint issue
liuliu-dev 28f5b66
Merge branch 'main' into liuliu/remove-sx-from-segmentcontrol
liuliu-dev 9d292d1
import React
liuliu-dev 32f40fe
Merge branch 'liuliu/remove-sx-from-segmentcontrol' of https://github…
liuliu-dev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| '@primer/react': major | ||
| --- | ||
| Remove sx prop support from the SegmentedControl component. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 0 additions & 44 deletions
44 packages/react/src/SegmentedControl/SegmentedControl.dev.stories.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 3 additions & 18 deletions
21 packages/react/src/SegmentedControl/SegmentedControl.docs.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 5 additions & 15 deletions
20 packages/react/src/SegmentedControl/SegmentedControlButton.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 11 additions & 25 deletions
36 packages/react/src/SegmentedControl/SegmentedControlIconButton.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,5 @@ | ||
| export * from './SegmentedControl' | ||
| export type {SegmentedControlProps} from './SegmentedControl' | ||
| export type {SegmentedControlButtonProps} from './SegmentedControlButton' | ||
| export type {SegmentedControlIconButtonProps} from './SegmentedControlIconButton' |
3 changes: 3 additions & 0 deletions
3 packages/react/src/__tests__/__snapshots__/exports.test.ts.snap
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CopilotAISep 9, 2025
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.
The comment mentions that width is handled by CSS using
classes.IconButton, but this class is not defined in the visible changes and may not actually handle the width styling that was previously managed by the sx prop. This could result in incorrect styling behavior.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.
Reusing the
IconButtonclassName in SegmentedControl.module.css