Skip to content

Update ActionList.examples.stories.tsx to no longer use styled-components #6544

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

llastflowers
Copy link
Contributor

Closes https://github.com/github/primer/issues/5667

Changelog

New

Added new CSS module

Changed

Changed ActionList.examples.stories.tsx to no longer use styled-components

Removed

Removed anything associated with styled-components

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan
  • None; if selected, include a brief description as to why

Testing & Reviewing

Merge checklist

@llastflowers llastflowers self-assigned this Aug 8, 2025
@llastflowers llastflowers added skip changeset This change does not need a changelog integration-tests: skipped manually Changes in this PR do not require an integration test labels Aug 8, 2025

This comment was marked as resolved.

Copy link
Contributor

github-actions bot commented Aug 8, 2025

size-limit report 📦

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

Copy link
Contributor

@Copilot Copilot AI left a 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 migrates the ActionList examples stories from using styled-components to CSS modules, supporting the broader effort to remove styled-components from the codebase. The changes replace inline sx props and Box components with CSS module classes while maintaining the same visual styling and functionality.

  • Replaces styled-components usage with CSS module classes
  • Removes dependency on the Box component
  • Maintains existing styling through equivalent CSS rules

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
packages/react/src/ActionList/ActionList.examples.stories.tsx Updates component styling from sx props to CSS module classes and replaces Box with div
packages/react/src/ActionList/ActionList.examples.stories.module.css New CSS module file containing equivalent styles for the migrated components


.AsyncListNoMatch {
display: block;
font-size: var(--text-body-size-medium);
Copy link
Preview

Copilot AI Aug 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CSS variable --text-body-size-medium may not match the original fontSize: 1 from the sx prop. In the styled-system, fontSize: 1 typically maps to a smaller font size than medium. Verify this mapping is correct.

Suggested change
font-size: var(--text-body-size-medium);
font-size: var(--text-body-size-small);

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration-tests: skipped manually Changes in this PR do not require an integration test skip changeset This change does not need a changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant