From 14df589974708469b0fd92bcf6846c907e2b82d7 Mon Sep 17 00:00:00 2001 From: Roman Slonov Date: Fri, 19 Apr 2019 12:14:05 +0800 Subject: [PATCH] Added inverted prop --- docs/components/button.md | 1 + src/components/Button/main.vue | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/docs/components/button.md b/docs/components/button.md index cb7d379..4db3cfe 100644 --- a/docs/components/button.md +++ b/docs/components/button.md @@ -127,6 +127,7 @@ size | String | Button size, ['1', '2', '3', '4'] | '3' disabled | Boolean | Whether button disabled or not | false loading | Boolean | Whether button in loading state or not | false icon-first | Boolean | Set to `true` if you want to render icon before text | false +inverted | Boolean | Set to `true` in order to use button on dark background | false ## Slots Name | Slot props | Description diff --git a/src/components/Button/main.vue b/src/components/Button/main.vue index a5336df..87ac03c 100755 --- a/src/components/Button/main.vue +++ b/src/components/Button/main.vue @@ -45,6 +45,10 @@ export default { type: Boolean, default: false, }, + inverted: { + type: Boolean, + default: false, + }, }, computed: { classes() { @@ -55,6 +59,7 @@ export default { { 'button--icon-only': !this.$slots.default }, { 'button--icon-first': this.iconFirst }, { 'button--wide': this.wide }, + { 'button--inverted': this.inverted }, ]; }, },