Skip to content

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

Closed
kamaljohnson wants to merge 5 commits intofrappe:mainfrom
kamaljohnson:full-width-button
Closed

feat: add button-full-width class to Button component#1
kamaljohnson wants to merge 5 commits intofrappe:mainfrom
kamaljohnson:full-width-button

Conversation

@kamaljohnson
Copy link
Copy Markdown
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

Comment thread readme.md Outdated
<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
Copy Markdown
Collaborator

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
Copy Markdown
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
Copy Markdown
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