Skip to content
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

add abilty to control icon button sizes independent of button size #256

Merged
merged 2 commits into from
Aug 30, 2024

Conversation

steppy452
Copy link
Contributor

@steppy452 steppy452 commented Aug 29, 2024

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[x] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

Currently, if we set buttons to have unequal x and y padding, you would have to always add styles (or a custom size) to icon buttons if you wanted to make to square.

Issue Number: N/A

What is the new behavior?

Since we have an independent <IconButton /> component, we should allow for the icon button size to be controlled independently. This PR adds theme to allow control of icon button sizes independently of regular button sizes.

Also added a new story to demonstrate:
image

Does this PR introduce a breaking change?

[ ] Yes
[x] No - setting default icon button size padding to be the same as default button padding

Other information

Docs update - reaviz/reablocks-website#35

@steppy452 steppy452 requested a review from amcdnl August 29, 2024 23:36
Copy link

netlify bot commented Aug 29, 2024

Deploy Preview for reablocks-storybook ready!

Name Link
🔨 Latest commit 595e245
🔍 Latest deploy log https://app.netlify.com/sites/reablocks-storybook/deploys/66d1094444cf6c0008da0ef3
😎 Deploy Preview https://deploy-preview-256--reablocks-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@amcdnl amcdnl merged commit 261ced0 into master Aug 30, 2024
5 checks passed
@amcdnl amcdnl deleted the syang/icon-button-sizes branch August 30, 2024 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants