Update to latest primitives version and add visual fix for toggleSwitch#7588
Update to latest primitives version and add visual fix for toggleSwitch#7588lukasoppermann wants to merge 6 commits intomainfrom
Conversation
|
👋 Hi, this pull request contains changes to the source code that github/github-ui depends on. If you are GitHub staff, test these changes with github/github-ui using the integration workflow. Or, apply the |
🦋 Changeset detectedLatest commit: c2c0706 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 |
|
🤖 Lint issues have been automatically fixed and committed to this PR. |
f82ce59 to
3637755
Compare
There was a problem hiding this comment.
Pull request overview
This PR updates the @primer/primitives dependency from version 11.3.1 to 11.5.0 and adjusts the ToggleSwitch component's knob styling to accommodate visual changes introduced in the new primitives version. The changes ensure the ToggleSwitch knob has proper 1px spacing around it within the track.
Changes:
- Updated
@primer/primitivesfrom 11.3.1 to 11.5.0 in package-lock.json - Adjusted ToggleSwitch knob positioning with 1px insets (top, bottom, left)
- Modified border-radius calculation to use
--borderWidth-thickinstead of--borderWidth-thin - Updated translateX transform to account for 1px spacing on both sides
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/react/src/ToggleSwitch/ToggleSwitch.module.css | Adjusts knob positioning (1px insets), border-radius calculation, and transform to create proper spacing with the new primitives styling |
| package-lock.json | Updates @primer/primitives dependency to 11.5.0 |
|
🤖 Lint issues have been automatically fixed and committed to this PR. |
|
🤖 Lint issues have been automatically fixed and committed to this PR. |
|
🤖 Lint issues have been automatically fixed and committed to this PR. |
|
🤖 Lint issues have been automatically fixed and committed to this PR. |
Todo
This requires primer/primitives#1318
Changelog
Rollout strategy
Testing & Reviewing
Merge checklist