Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Aug 13, 2025

This PR removes styled-components usage from CheckboxGroup.dev.stories.tsx by migrating from the sx prop to CSS modules, following the established migration pattern used in other components.

Changes Made

  • Removed all sx prop usage: Converted sx styles on CheckboxGroup, CheckboxGroup.Caption, and CheckboxGroup.Label to CSS classes
  • Created CheckboxGroup.dev.module.css: Added CSS module with equivalent styles using CSS custom properties for design tokens
  • Updated story metadata: Removed sx from excluded controls since it's no longer used
  • Renamed story: Changed from SxProps to WithCss to reflect the new CSS-based approach

Technical Details

The migration preserves all original styling:

  • CheckboxGroup: Default text color with 16px vertical margins
  • Caption: Muted text color with small font size and weight
  • Label: Default text color with 14px font size and medium font weight

All styles now use CSS custom properties (e.g., var(--fgColor-default), var(--base-size-16)) to maintain consistency with the design system.

Visual Verification

CheckboxGroup dev story

The CheckboxGroup dev story continues to display correctly with identical visual appearance, now using CSS modules instead of styled-components.

This change contributes to the ongoing migration away from styled-components in the Primer React codebase, improving performance and reducing bundle size.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copy link

changeset-bot bot commented Aug 13, 2025

⚠️ No Changeset found

Latest commit: 37a44a2

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@Copilot Copilot AI changed the title [WIP] Remake PR #6583: Remove styled-components from CheckboxGroup.dev.stories.tsx Remove styled-components from CheckboxGroup.dev.stories.tsx Aug 13, 2025
@Copilot Copilot AI requested a review from pksjce August 13, 2025 03:27
Copilot finished work on behalf of pksjce August 13, 2025 03:27
@pksjce pksjce requested a review from llastflowers August 13, 2025 13:32
@github-actions github-actions bot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Aug 13, 2025
Copy link
Contributor

👋 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!

@pksjce pksjce closed this Aug 13, 2025
Copy link
Contributor

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 90.15 KB (0%)
packages/react/dist/browser.umd.js 90.34 KB (0%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants