Closed danilo-moreira-brisa closed 5 months ago
This set of changes represents a significant refactor across various components in a React project, focusing on adopting modern practices like using styled-components
for styling, refining prop handling, and enhancing test setups. The modifications streamline the codebase, improve readability, and ensure consistency in styling and functionality.
Files | Summary |
---|---|
src/components/alert/alert.tsx | Updated import to destructure useState and standardized single quotes in JSX attributes. |
src/components/button/... | Refactored button component and tests, introduced ButtonSizes and ButtonVariants , updated styling with styled-components . |
src/components/icons/icons.tsx | Removed unnecessary React import and updated viewBox attribute quotes. |
src/components/utils/test-utils.tsx | Added utility function renderWithTheme for theming in tests. |
src/stitches.config.ts | Removed global style transition property. |
src/stories/button/button.stories.tsx | Updated story titles and properties, added new arguments for button variants. |
styled-components
directly aligns with the objectives of this issue."In the land of code, where the snippets roam free,
A rabbit hopped in, as happy as can be.
🐰 With a flick and a hop, it refactored away,
Making the buttons shine, in a stylish display.
From alerts to icons, and stories told bright,
It left its mark, making the codebase light.
🌟 With every line typed, and every test run,
It danced in the moonlight, under the coding sun."
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
@coderabbitai review
Summary by CodeRabbit
New Features
Refactor
Bug Fixes
viewBox
attribute quote style in the icons component.Documentation