22 lines
392 B
Vue
Raw Normal View History

<template lang="pug">
2017-07-01 22:23:40 -04:00
.toggle(:class='{ "is-active": value }', @click='changeToggle')
.toggle-container
.toggle-pin
.toggle-text {{ desc }}
</template>
<script>
export default {
name: 'toggle',
2017-07-01 22:23:40 -04:00
props: ['value', 'desc'],
data () {
return { }
},
methods: {
changeToggle() {
2017-07-01 22:23:40 -04:00
this.$emit('input', !this.value)
}
}
}
</script>