Skip to content

Commit

Permalink
cleanup(v-btn): contextual props are not used any more
Browse files Browse the repository at this point in the history
  • Loading branch information
jacekkarczmarczyk committed Jan 6, 2018
1 parent 980f04b commit fb991b4
Showing 1 changed file with 1 addition and 21 deletions.
22 changes: 1 addition & 21 deletions src/components/VBtn/VBtn.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@ export default {

computed: {
classes () {
const colorBackground = !this.outline && !this.flat
const colorText = !this.disabled && !colorBackground

const classes = {
'btn': true,
'btn--active': this.isActive,
Expand All @@ -79,24 +76,7 @@ export default {
...this.themeClasses
}

if (!this.color) {
return Object.assign(classes, {
'primary': this.primary && colorBackground,
'secondary': this.secondary && colorBackground,
'success': this.success && colorBackground,
'info': this.info && colorBackground,
'warning': this.warning && colorBackground,
'error': this.error && colorBackground,
'primary--text': this.primary && colorText,
'secondary--text': this.secondary && colorText,
'success--text': this.success && colorText,
'info--text': this.info && colorText,
'warning--text': this.warning && colorText,
'error--text': this.error && colorText
})
}

return colorBackground
return (!this.outline && !this.flat)
? this.addBackgroundColorClassChecks(classes)
: this.addTextColorClassChecks(classes)
}
Expand Down

0 comments on commit fb991b4

Please sign in to comment.