Update Select stories to no longer use styled-components#6478
Update Select stories to no longer use styled-components#6478llastflowers merged 12 commits intomainfrom
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
size-limit report 📦
|
There was a problem hiding this comment.
Pull Request Overview
This PR removes styled-components dependencies from Select component stories by replacing styled-components usage with CSS modules and native HTML elements. The changes support migration away from styled-components while maintaining the same visual functionality.
- Replace
Box as="form"with native<form>elements across all stories - Replace
sxprop styling with CSS modules for custom styling story - Add new
wrapperClassNameprop to Select component to support custom styling
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| Select.tsx | Adds wrapperClassName prop to pass custom CSS classes to the wrapper element |
| Select.stories.tsx | Replaces styled-components Box with native form elements |
| Select.features.stories.tsx | Replaces styled-components usage and implements CSS module for custom styling |
| Select.features.stories.module.css | New CSS module defining custom select styling |
…ect Select styling
|
👋 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! |
… on the outer span wrapper of the select, which is TextInputWrapper
|
👋 Hi, there are new commits since the last successful integration test. We recommend running the integration workflow once more, unless you are sure the new changes do not affect github/github. Thanks! |
This comment was marked as outdated.
This comment was marked as outdated.
|
👋 Hi, there are new commits since the last successful integration test. We recommend running the integration workflow once more, unless you are sure the new changes do not affect github/github. Thanks! |
Closes https://github.com/github/primer/issues/5625
Closes https://github.com/github/primer/issues/5626
Closes https://github.com/github/primer/issues/5627
Changelog
New
Added 2 new CSS modules
Changed
Changed
Select.features.stories.tsxandSelect.stories.tsxandSelect.dev.stories.tsxto no longer use styled-componentsChanged the className prop to be on TextInputWrapper instead of Select, so that using className on Select components styles the wrapper correctly (as was already happening when using the sx prop, which was correctly passed to TextInputWrapper).
Removed
Removed anything associated with styled-components
Rollout strategy
Testing & Reviewing
Merge checklist