Z-Button
A vue based implementation of modern dynamic buttons that bring the best experience and simplicity. It supports enough props to satisfy mind-blowing customizations.
Installation
yarn add @jkwamlah/z-button
npm i @jkwamlah/z-button
Props
buttonStyleObject: {
type: Object,
default: () => ({})
},
textStyleObject: {
type: Object,
default: () => ({})
},
buttonType: {
type: String,
default: ''
},
buttonText: {
type: String,
default: ''
},
dataToggle: {
type: String,
default: ''
},
dataTarget: {
type: String,
default: ''
},
icon: {
type: String,
default: ''
},
iconStyleObject: {
type: Object,
default: () => {}
},
loading: {
type: Boolean,
default: false
}
Methods
methods: {
handleButtonClick() {
this.$emit('button-clicked')
}
}
Usage
###Example 1
<z-button
icon="icon-bookmarks-document"
:button-style-object="buttonStyleObject"
/>
###Example 2
<z-button
:buttonStyleObject="buttonStyleObject"
:textStyleObject="buttonTextStyleObject"
button-type="button"
button-text="view"
@click.native.stop="handleButtonClick()"
/>