Skip to content

Commit

Permalink
Merge pull request #2516 from nextcloud/add-button-native-type-props
Browse files Browse the repository at this point in the history
Add button native type prop on <Button>
  • Loading branch information
ChristophWurst authored Feb 25, 2022
2 parents d73bc38 + 48d1d07 commit 304f16b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/components/Button/Button.vue
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ button {
v-bind="$attrs"
:class="buttonClassObject"
:aria-label="ariaLabel"
:type="nativeType"
:disabled="disabled"
v-on="$listeners"
@keydown.enter="makeActive"
Expand Down Expand Up @@ -260,6 +261,19 @@ export default {
default: '',
},

/**
* Specifies the button native type
* Accepted values: submit, reset, button. If left empty,
* the default "button" type will be used.
*/
nativeType: {
type: String,
validator(value) {
return ['submit', 'reset', 'button'].indexOf(value) !== -1
},
default: 'button',
},

/**
* Specifies whether the button should span all the available width.
* By default, buttons span the whole width of the container.
Expand Down

0 comments on commit 304f16b

Please sign in to comment.