Skip to content

Update Text.features.stories.tsx to no longer use styled-components #6512

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/5638

Changelog

New

Added new CSS module

Changed

Changed Text.features.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

This comment was marked as resolved.

@llastflowers llastflowers self-assigned this Aug 7, 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 7, 2025
Copy link
Contributor

github-actions bot commented Aug 7, 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 updates the Text component's feature stories to remove dependency on styled-components by migrating from the Box component with sx prop styling to standard CSS modules. The change supports the broader initiative to eliminate styled-components from the codebase.

  • Replaces Box component usage with a plain div and CSS module class
  • Converts inline sx prop styling to CSS module classes
  • Introduces a new CSS module file with equivalent styling using CSS custom properties

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
packages/react/src/Text/Text.features.stories.tsx Removes Box import and sx prop usage, adds CSS module import and applies classes
packages/react/src/Text/Text.features.stories.module.css New CSS module defining equivalent styles using CSS custom properties

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.

2 participants