@bigin/bigin-ui-button
Advanced tools
Comparing version 0.0.24 to 0.0.25
@@ -165,2 +165,6 @@ 'use strict';// | ||
}, | ||
primary: { | ||
type: Boolean, | ||
default: false | ||
}, | ||
danger: { | ||
@@ -177,2 +181,18 @@ type: Boolean, | ||
default: false | ||
}, | ||
loading: { | ||
type: Boolean, | ||
default: false | ||
}, | ||
disabled: { | ||
type: Boolean, | ||
default: false | ||
}, | ||
nativeType: { | ||
type: String, | ||
default: 'button' | ||
}, | ||
autofocus: { | ||
type: Boolean, | ||
default: false | ||
} | ||
@@ -182,23 +202,13 @@ }, | ||
typeClass() { | ||
if (this.text) { | ||
return 'btn-text' | ||
} | ||
if (this.icon) { | ||
return 'btn-icon' | ||
} | ||
return 'btn' | ||
return (this.text && 'btn-text') || (this.icon && 'btn-icon') || 'btn' | ||
}, | ||
variantClass() { | ||
return this.danger | ||
? `${this.typeClass}--danger` | ||
: `${this.typeClass}--default` | ||
return ( | ||
(this.primary && `${this.typeClass}--primary`) || | ||
(this.danger && `${this.typeClass}--danger`) || | ||
`${this.typeClass}--default` | ||
) | ||
}, | ||
sizingClass() { | ||
if (this.small) { | ||
return 'small' | ||
} | ||
if (this.large) { | ||
return 'large' | ||
} | ||
return 'medium' | ||
return (this.small && 'small') || (this.large && 'large') || 'medium' | ||
} | ||
@@ -289,3 +299,18 @@ } | ||
"button", | ||
{ class: [_vm.typeClass, _vm.variantClass, _vm.sizingClass] }, | ||
_vm._g( | ||
{ | ||
class: [ | ||
_vm.typeClass, | ||
_vm.variantClass, | ||
_vm.sizingClass, | ||
{ loading: _vm.loading } | ||
], | ||
attrs: { | ||
disabled: _vm.disabled || _vm.loading, | ||
autofocus: _vm.autofocus, | ||
type: _vm.nativeType | ||
} | ||
}, | ||
_vm.$listeners | ||
), | ||
[ | ||
@@ -292,0 +317,0 @@ _vm.prefixIcon |
{ | ||
"name": "@bigin/bigin-ui-button", | ||
"version": "0.0.24", | ||
"version": "0.0.25", | ||
"description": "Bigin Design System Button component", | ||
@@ -30,3 +30,3 @@ "author": "Tam Mai <tam.mai@bigin.vn>", | ||
}, | ||
"gitHead": "9ec785b272d41ee3a5d67b09a7bf5ef520c26637" | ||
"gitHead": "42c6fc1ee479d870c4aefe073ee4cfd43273e8a1" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12237
346