-
Notifications
You must be signed in to change notification settings - Fork 622
Update Textarea stories to no longer use styled-components #6513
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
This comment was marked as resolved.
This comment was marked as resolved.
size-limit report 📦
|
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 dependencies on styled-components from Textarea Storybook stories by replacing Box
components with native HTML form
elements and replacing the sx
prop with CSS modules for styling.
- Removed
Box
component imports and usage across three story files - Created a new CSS module file for custom styling previously handled by the
sx
prop - Replaced styled-components approach with native HTML elements and CSS modules
Reviewed Changes
Copilot reviewed 4 out of 8 changed files in this pull request and generated no comments.
File | Description |
---|---|
packages/react/src/Textarea/Textarea.stories.tsx | Removed Box import and replaced Box as="form" with native form elements |
packages/react/src/Textarea/Textarea.features.stories.tsx | Removed Box import and replaced all Box as="form" instances with native form elements |
packages/react/src/Textarea/Textarea.dev.stories.tsx | Removed Box import, replaced Box as="form" with form, and replaced sx prop with CSS module class |
packages/react/src/Textarea/Textarea.dev.stories.module.css | Added new CSS module with background color styling to replace sx prop usage |
Closes https://github.com/github/primer/issues/5639
Closes https://github.com/github/primer/issues/5640
Closes https://github.com/github/primer/issues/5641
Changelog
New
Added new CSS module
Changed
Changed
Textarea.stories.tsx
andTextarea.dev.stories.tsx
andTextarea.features.stories.tsx
to no longer use styled-componentsRemoved
Removed anything associated with styled-components
Rollout strategy
Testing & Reviewing
Merge checklist