-
Notifications
You must be signed in to change notification settings - Fork 179
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
feat : Add XS size variant to IconButton component #1822
feat : Add XS size variant to IconButton component #1822
Conversation
🦋 Changeset detectedLatest commit: 680c357 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Hey @mukulpadwal nice PR! Thanks for submitting, we'll have someone look at it soon 🚀 |
@mukulpadwal @simotae14 that's all good 👌 |
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.
Looks good to me. Not sure what's up with chromatic 🤔
What does it do?
This PR introduces an XS variant for the
IconButton
component, adding a smaller button size option with 4px padding (0.25rem) around the icon. The changes include:XS
size in theIconButton
component to apply the appropriate padding (padding-block: 0.25rem; - padding-inline: 0.25rem
).BUTTON_SIZES
constant to includeXS
as a valid option:export const BUTTON_SIZES = ['XS', 'S', 'M', 'L']
.Adjusted documentation to reflect the addition of the new
XS
size.Why is it needed?
The addition of the
XS
variant for theIconButton
component addresses the need for smaller buttons in certain parts of the CMS. This will allow for a more elegant UI and simplify the code by eliminating the need to manually define hover states and click areas for each instance. The XS size will provide a more compact and consistent option for icon-only buttons in small UI elements.How to test it?
To test the new XS size, follow these steps:
IconButton
component in Storybook.XS
size variant.Additionally, a video demonstrating the changes has been attached for visual reference, showing the component's behavior with the new XS size.
XS.size.variant.to.IconButton.component.mp4
Related issue(s)/PR(s)
#1820