-
Notifications
You must be signed in to change notification settings - Fork 626
Update Hidden.examples.stories.tsx to no longer use styled-components #6531
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
base: main
Are you sure you want to change the base?
Conversation
|
…ponents Co-authored-by: hectahertz <[email protected]>
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.
Pull Request Overview
This PR migrates the Hidden component's example stories from styled-components to CSS Modules as part of the ongoing effort to remove styled-components dependencies from Storybook stories.
- Replaced
Box
andText
components with plain HTML elements (div
,span
) using CSS Module classes - Removed styled-components-based
sx
props in favor ofclassName
attributes - Created a new CSS Module file with equivalent styles 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/Hidden/Hidden.examples.stories.tsx | Migrated from styled-components to CSS Modules, replacing Box/Text components with HTML elements and sx props with className |
packages/react/src/Hidden/Hidden.examples.stories.module.css | Added CSS Module with equivalent styles using CSS custom properties for container padding, description text, and bold links |
👋 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! |
size-limit report 📦
|
Migrated
packages/react/src/Hidden/Hidden.examples.stories.tsx
away from styled-components as part of the ongoing effort to remove styled-components dependencies from storybook stories.Changes Made
Replaced styled-components usage with CSS Modules:
<Box sx={{padding: 3}}>
with<div className={classes.Container}>
<Text sx={{fontSize: 1, color: 'fg.muted'}}>
with<span className={classes.DescriptionText}>
sx={{fontWeight: 'bold'}}
prop withclassName={classes.BoldLink}
Created CSS Module file:
Added
Hidden.examples.stories.module.css
with equivalent styles:Cleaned up imports:
Box
andText
from component importsclsx
importScreenshots
The migration maintains identical visual appearance and functionality:
Pull Request Page Example:

Webhooks Example:

All Hidden component examples continue to render correctly with proper responsive behavior, styling, and layout while eliminating styled-components dependencies.
Fixes #6530.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.