-
Notifications
You must be signed in to change notification settings - Fork 622
Remove styled-components usage from DataTable.features.stories.tsx #6501
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 <24622853+hectahertz@users.noreply.github.com>
size-limit report 📦
|
.RepositoryHeader { | ||
display: flex; | ||
align-items: center; | ||
gap: var(--base-size-4); /* 0.25rem equivalent to sx={{gap: 1}} */ |
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.
@copilot you can remove this comment
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.
Removed the unnecessary comment. Changes are in commit dd6e7fa.
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 removes the last remaining styled-components usage from DataTable.features.stories.tsx
by migrating to CSS modules as part of the project's styled-components migration effort.
- Removes the deprecated Box component import and usage
- Creates a new CSS module file with equivalent styling
- Replaces Box component with a div using CSS module class
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
File | Description |
---|---|
packages/react/src/DataTable/DataTable.features.stories.tsx | Removes Box import and replaces Box usage with div using CSS module class |
packages/react/src/DataTable/DataTable.features.stories.module.css | Creates new CSS module with RepositoryHeader class providing equivalent flex styling |
Comments suppressed due to low confidence (1)
packages/react/src/DataTable/DataTable.features.stories.module.css:4
- The comment incorrectly states '0.25rem' when var(--base-size-4) typically equals 0.25rem * 4 = 1rem. The comment should clarify that var(--base-size-4) is equivalent to gap: 1 in the spacing scale, not the literal rem value.
gap: var(--base-size-4); /* 0.25rem equivalent to sx={{gap: 1}} */
Co-authored-by: hectahertz <24622853+hectahertz@users.noreply.github.com>
This PR removes the last remaining styled-components usage from
DataTable.features.stories.tsx
as part of the migration away from styled-components to CSS modules.Changes Made
import Box from '../Box'
- the deprecated styled-components-based Box componentDataTable.features.stories.module.css
with a.RepositoryHeader
class for story-specific stylingWithRightAlignedColumns
story with a<div>
using the CSS module classTechnical Details
The Box component was only used in one place within the
WithRightAlignedColumns
story to create a flex container for the Repository header with an icon:Before:
After:
The equivalent CSS module provides the same styling:
Verification
The file now has zero styled-components dependencies and follows the project's CSS modules migration guidelines.
Fixes #6500.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.