2020-02-21 21:40:46 +01:00
|
|
|
<template>
|
2020-09-07 03:19:08 +02:00
|
|
|
<div
|
|
|
|
class="switch-ctn"
|
|
|
|
:class="{compact}"
|
|
|
|
>
|
2020-02-21 21:40:46 +01:00
|
|
|
<input
|
|
|
|
:id="id"
|
2020-06-19 22:20:06 +02:00
|
|
|
v-model="currentValue"
|
|
|
|
type="checkbox"
|
2020-02-21 21:40:46 +01:00
|
|
|
name="set-name"
|
|
|
|
class="switch-input"
|
2020-06-19 22:20:06 +02:00
|
|
|
:checked="currentValue"
|
2020-02-21 21:40:46 +01:00
|
|
|
@change="$emit('change', currentValue)"
|
|
|
|
>
|
|
|
|
<label
|
|
|
|
:for="id"
|
2020-04-12 05:51:29 +02:00
|
|
|
class="switch-label"
|
2020-02-21 21:40:46 +01:00
|
|
|
>
|
|
|
|
{{ label }}
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script src="./ft-toggle-switch.js" />
|
2020-03-27 12:37:54 +01:00
|
|
|
<style scoped lang="sass" src="./ft-toggle-switch.sass" />
|