Files
PhotonVision/chameleon-client/src/components/cv-switch.vue

36 lines
729 B
Vue
Raw Normal View History

<template>
<div>
<v-row dense align="center">
<v-col :cols="2">
<span>{{name}}</span>
</v-col>
<v-col>
2019-10-29 23:58:06 +02:00
<v-switch v-model="localValue" color="#4baf62"/>
</v-col>
</v-row>
</div>
</template>
<script>
export default {
name: 'CVSwitch',
2019-10-29 23:58:06 +02:00
props: ['name', 'value'],
data() {
2019-10-29 23:58:06 +02:00
return {}
},
2019-10-29 23:58:06 +02:00
computed: {
localValue: {
get() {
return this.value;
},
2019-10-29 23:58:06 +02:00
set(value) {
this.$emit('input', value)
}
}
}
}
</script>
<style lang="" scoped>
2019-10-29 23:58:06 +02:00
</style>