-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PLAY-1858] Icon Button Sizes (#4218)
**What does this PR do?** A clear and concise description with your runway ticket url. This PR adds the `size` prop to the `icon_button_kit` in Rails and allows the developer to specify the size of an Icon Button. [Story](https://runway.powerhrg.com/backlog_items/PLAY-1858) **Screenshots:** Screenshots to visualize your addition/change ![Screenshot 2025-02-03 at 1 17 55 PM](https://github.com/user-attachments/assets/ab429e1f-1c0a-4e61-9e95-a384fadbb21c) **How to test?** Steps to confirm the desired behavior: 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' 4. See addition/change #### Checklist: - [x] **LABELS** Add a label: `enhancement`, `bug`, `improvement`, `new kit`, `deprecated`, or `breaking`. See [Changelog & Labels](https://github.com/powerhome/playbook/wiki/Changelog-&-Labels) for details. - [x] **DEPLOY** I have added the `milano` label to show I'm ready for a review. - [ ] **TESTS** I have added test coverage to my code.
- Loading branch information
1 parent
f38de91
commit 2d2eba3
Showing
6 changed files
with
38 additions
and
6 deletions.
There are no files selected for viewing
3 changes: 1 addition & 2 deletions
3
playbook/app/pb_kits/playbook/pb_icon_button/docs/_icon_button_default.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
<%= pb_rails("icon_button") %> | ||
</br> | ||
<%= pb_rails("icon_button", props: {variant: "link"}) %> | ||
<%= pb_rails("icon_button", props: {variant: "link", margin_top: "md" }) %> |
27 changes: 27 additions & 0 deletions
27
playbook/app/pb_kits/playbook/pb_icon_button/docs/_icon_button_sizes.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<%= pb_rails("flex", props: { align: "center"}) do %> | ||
<%= pb_rails("icon_button", props: {size: "lg"}) %> <span>Large</span> | ||
<% end %> | ||
|
||
<%= pb_rails("flex", props: { align: "center" }) do %> | ||
<%= pb_rails("icon_button", props: {size: "sm"}) %> <span>Small</span> | ||
<% end %> | ||
|
||
<%= pb_rails("flex", props: { align: "center" }) do %> | ||
<%= pb_rails("icon_button", props: {size: "xs"}) %> <span>XSmall</span> | ||
<% end %> | ||
|
||
<%= pb_rails("flex", props: { align: "center", margin_top: "md" }) do %> | ||
<%= pb_rails("icon_button", props: {size: "1x"}) %> <span>1x</span> | ||
<% end %> | ||
|
||
<%= pb_rails("flex", props: { align: "center" }) do %> | ||
<%= pb_rails("icon_button", props: {size: "2x"}) %> <span>2x</span> | ||
<% end %> | ||
|
||
<%= pb_rails("flex", props: { align: "center" }) do %> | ||
<%= pb_rails("icon_button", props: {size: "3x"}) %> <span>3x</span> | ||
<% end %> | ||
|
||
<%= pb_rails("flex", props: { align: "center" }) do %> | ||
<%= pb_rails("icon_button", props: {size: "4x"}) %> <span>4x</span> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,4 @@ examples: | |
|
||
rails: | ||
- icon_button_default: Default | ||
|
||
|
||
|
||
- icon_button_sizes: Sizes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters