1
0
mirror of https://github.com/kihashi/stardew_community_checklist.git synced 2025-10-19 08:03:17 +00:00

Add a button checkbox component

This commit is contained in:
John Cleaver 2018-04-30 22:44:59 -04:00
parent 2fb087e02e
commit 5db60dd09b

View File

@ -0,0 +1,36 @@
<template>
<button class="button is-rounded"
:class="checked ? checked_class : unchecked_class"
v-on:click="click"
>
<slot></slot>
</button>
</template>
<script>
export default {
name: 'button-checkbox',
props: {
checked_class: {
default: 'is-info'
},
unchecked_class: {
default: ''
}
},
data () {
return {
checked: true
}
},
methods: {
click () {
this.checked = !this.checked
}
}
}
</script>
<style>
</style>