Update BaseStyles.dev.stories.tsx to no longer use styled-components #6576
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR migrates the
BaseStyles.dev.stories.tsx
file from usingstyled-components
to CSS modules as part of the project's effort to move away fromstyled-components
.Changes Made
BaseStyles
component usage from all stories and replaced with plain<div>
elementsBaseStyles.dev.stories.module.css
with CSS classes that replicate the exact styling behavior of the originalsx
and system propsclsx
for combining CSS classes and the new CSS moduleWithSxProps
: Now uses CSS class instead ofsx
propWithSystemProps
: Now uses CSS class instead of system props likecolor
,backgroundColor
, etc.WithStyleProps
: Already used inline styles, no changes neededDefault
: No changes needed (returns plain text)Visual Verification
All stories maintain their exact visual appearance:
The migration demonstrates the pattern for replacing
styled-components
usage with CSS modules while maintaining identical visual output. All styling properties (red text, blue background, Arial font, line-height, font-size, display flex) are preserved using CSS classes instead of runtime styled-components.Technical Details
clsx
for conditional class application as per project standardsFixes #6575.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.