-
Notifications
You must be signed in to change notification settings - Fork 625
Update Overlay.stories.tsx to no longer use styled-components #6494
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
|
Co-authored-by: hectahertz <[email protected]>
👋 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! |
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 Overlay stories from styled-components to CSS modules, removing all Box
component usage and sx
prop styling as part of the project's ongoing migration away from styled-components.
- Replaced Box components with div elements using CSS module classes
- Created CSS module file with equivalent styling using design tokens and media queries
- Maintained all existing visual styling and behavior while removing styled-components dependencies
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
File | Description |
---|---|
packages/react/src/Overlay/Overlay.stories.tsx | Replaced Box components and sx props with div elements and CSS module classes |
packages/react/src/Overlay/Overlay.stories.module.css | New CSS module containing story-specific styles with design tokens and responsive breakpoints |
size-limit report 📦
|
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
…mplementation Co-authored-by: hectahertz <[email protected]>
Head branch was pushed to by a user without write access
This PR removes all usage of styled-components from
packages/react/src/Overlay/Overlay.stories.tsx
as part of the ongoing migration away from the library.Changes Made
Removed styled-components usage:
Box
component imports and usage (4 instances)sx
prop usage on components (4 instances)Overlay.stories.module.css
to replace inline styles with CSS modulesCSS Module Implementation:
width: ['350px', '500px']
behavior:var(--base-size-4)
) for consistent spacingFiles Modified:
packages/react/src/Overlay/Overlay.stories.tsx
- Migrated from Box components to div elements with CSS classespackages/react/src/Overlay/Overlay.stories.module.css
- New CSS module containing story-specific stylesTechnical Details
The migration preserves all existing functionality while removing dependencies on styled-components:
<Box ref={anchorRef}>
with<div ref={anchorRef} className={classes.OverlayContainer}>
sx
props to.FullHeightContent
CSS classsx
to.CloseButtonOverlay
classwidth: ['350px', '500px']
with CSS media queries that correctly implement the mobile-first responsive behaviorAll tests pass and Storybook builds successfully with these changes.
Fixes #6493.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.