-
Notifications
You must be signed in to change notification settings - Fork 626
Update TreeViewWithLeadingAction.stories.tsx to no longer use styled-components #6529
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]>
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 TreeViewWithLeadingAction.stories.tsx
file from using styled-components to CSS Modules as part of the broader effort to remove styled-components dependencies from the codebase.
Key changes:
- Replaces
Box
components with standarddiv
elements - Removes all
sx
prop usage in favor of CSS classes - Creates a dedicated CSS Module file for story-specific styling
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
File | Description |
---|---|
packages/react/src/TreeView/TreeViewWithLeadingAction.stories.tsx |
Removes styled-components imports and usage, replaces Box components with divs and sx props with CSS classes |
packages/react/src/TreeView/TreeViewWithLeadingAction.stories.module.css |
New CSS Module file containing the equivalent styles for the migrated components |
👋 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 📦
|
As part of the ongoing migration away from
styled-components
, this PR removes all styled-components usage from theTreeViewWithLeadingAction.stories.tsx
file and replaces it with CSS Modules.Changes Made
Removed styled-components dependencies:
Box
component imports and usagesx
prop usage with CSS classesMigration details:
<Box sx={{maxWidth: 400}}>
→<div className={classes.StoryContainer}>
<Box>
wrapper →<div>
sx={{color: 'done.fg'}}
→className={classes.DoneIcon}
using--fgColor-done
sx={{color: 'open.fg'}}
→className={classes.OpenIcon}
using--fgColor-open
New CSS Module file:
TreeViewWithLeadingAction.stories.module.css
The story functionality remains exactly the same - this is a pure refactoring from styled-components to CSS Modules with no visual or behavioral changes.
Fixes #6528.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.