vue2-undraw
Version:
A component library of undraw.co for vue.
25 lines (24 loc) • 425 B
JavaScript
export const undrawMixin = (name) => ({
data: () => ({
width: '100%'
}),
props: {
color: {
type: String,
default: null
}
},
computed: {
style () {
return {
'fill': this.color ? this.color : (this.$vueUndrawColor ? this.$vueUndrawColor : 'currentColor')
}
},
classes () {
return [
`vue-undraw`,
`vue-undraw--${name}`
]
}
}
})