mirror of
https://github.com/ArenMg/aren.git
synced 2024-06-26 10:23:45 +00:00
24 lines
671 B
Vue
24 lines
671 B
Vue
<template>
|
|
<div class="switch">
|
|
<label>
|
|
<i v-if='offIcon' class="material-icons">{{offIcon}}</i>
|
|
{{offLabel}}
|
|
<input v-bind:checked="checked"
|
|
@change="$emit('toggle', $event.target.checked)"
|
|
type="checkbox"/>
|
|
<span class="lever"></span>
|
|
<i v-if='onIcon' class="material-icons">{{onIcon}}</i>
|
|
{{onLabel}}
|
|
</label>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
module.exports = {
|
|
props: ['checked', 'onLabel', 'offLabel', 'offIcon', 'onIcon'],
|
|
model: {
|
|
prop: 'checked',
|
|
event: 'toggle'
|
|
}
|
|
};
|
|
</script> |