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

feat: add button-full-width class to Button component #1

Closed
wants to merge 5 commits into from

Conversation

kamaljohnson
Copy link
Contributor

@kamaljohnson kamaljohnson commented Feb 4, 2022

Feature

Added class button-full-width which when set to true will set the button width to the element width that it is contained in, It is set to false as default.

How to use

<Button icon-right="chevron-down" :width-full="true">Button</Button>

In action

When used within other components

readme.md Outdated
@@ -102,6 +102,7 @@ app.mount("#app");
<Button icon-left="menu">Menu</Button>
<Button icon-right="external-link">Link</Button>
<Button :loading="true">Loading</Button>
<Button :button-full-width="true">Full Width Button</Button>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<Button :button-full-width="true">Full Width Button</Button>
<Button :full-width="true">Full Width Button</Button>

Button is redundant anyways, the readability remains same.

Copy link
Contributor Author

@kamaljohnson kamaljohnson Feb 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I was going to do the same, but the naming which was used in the Dropdown component for this class is this

dropdownWidthFull: {
type: Boolean,
default: false,
},

I named the class in the same way to maintain consistency throughout.

I too think we should just use full-width instead.

Copy link
Contributor Author

@kamaljohnson kamaljohnson Feb 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have refactored the class tag from button-full-width -> width-full

@kamaljohnson kamaljohnson deleted the full-width-button branch February 26, 2022 17:57
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