2020-02-21 21:40:46 +01:00
|
|
|
<template>
|
|
|
|
<div>
|
|
|
|
<input
|
|
|
|
type="checkbox"
|
|
|
|
:id="id"
|
|
|
|
name="set-name"
|
|
|
|
class="switch-input"
|
|
|
|
:checked='currentValue'
|
|
|
|
v-model="currentValue"
|
|
|
|
@change="$emit('change', currentValue)"
|
|
|
|
>
|
|
|
|
<label
|
|
|
|
:for="id"
|
2020-03-27 12:37:54 +01:00
|
|
|
:class='(compact ? "compact " : "")+"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" />
|