feat: buttons v2#1269
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces “Buttons v2” in the component library by moving the Button styling to a token-based/styled-components implementation and adding a dedicated IconButton component, along with Storybook updates and minor tooling tweaks.
Changes:
- Reworked
Buttonimplementation to use new variant/color token mappings and custom styles, with updated stories. - Added a new
IconButtonmolecule (component + styles + stories) and exported it from the molecules index. - Updated supporting utilities/tests and adjusted Storybook/vitest/tooling configuration (setup file order; new
clean/start:freshscripts).
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
vitest.config.ts |
Reorders jsdom setupFiles. |
src/molecules/index.ts |
Exports the new IconButton API. |
src/molecules/Button/types.ts |
Introduces shared button prop types. |
src/molecules/Button/tokens/* |
Adds token definitions for primary/danger + variant token types/mappings. |
src/molecules/Button/Button.utils.tsx |
Replaces old progress-color mapping with getLoadingColor. |
src/molecules/Button/Button.utils.test.ts |
Updates and expands unit tests for loading color selection. |
src/molecules/Button/Button.tsx |
Implements the new Button component with token-based styling and router-link support. |
src/molecules/Button/Button.styles.ts |
Adds styled-components primitives used by the new Button/IconButton. |
src/molecules/Button/Button.stories.tsx |
Updates Storybook stories to match Buttons v2 variants/colors and new props. |
src/molecules/Button/IconButton/IconButton.tsx |
Adds the new IconButton component with router-link support. |
src/molecules/Button/IconButton/IconButton.styles.tsx |
Adds styles for IconButton and its loading indicator. |
src/molecules/Button/IconButton/IconButton.stories.tsx |
Adds Storybook stories for IconButton variants/colors/shapes. |
src/molecules/Button/Button.docs.mdx |
Removes the prior MDX docs page for Button. |
package.json |
Adds clean + start:fresh scripts for Storybook cache/Vite cleanup. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 38 out of 38 changed files in this pull request and generated 8 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 38 out of 38 changed files in this pull request and generated 11 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
# Conflicts: # package.json
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 48 out of 48 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
# Conflicts: # package.json
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 48 out of 48 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mariush2
left a comment
There was a problem hiding this comment.
Just one minor thing about the stories 😄
# Conflicts: # package.json
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 49 out of 49 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
# Conflicts: # package.json
AB#714622
AB#679446