forked from platypush/platypush
Added optional id
attribute to ToggleSwitch
.
This commit is contained in:
parent
4b578c38c8
commit
34e2a59285
1 changed files with 5 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="power-switch" :class="{disabled: disabled}" @click.stop="onInput">
|
<div class="power-switch" :class="{disabled: disabled}" @click.stop="onInput">
|
||||||
<!--suppress HtmlFormInputWithoutLabel -->
|
<!--suppress HtmlFormInputWithoutLabel -->
|
||||||
<input type="checkbox" :checked="value">
|
<input type="checkbox" :checked="value" :id="id">
|
||||||
<label>
|
<label>
|
||||||
<!--suppress HtmlUnknownTag -->
|
<!--suppress HtmlUnknownTag -->
|
||||||
<div class="switch">
|
<div class="switch">
|
||||||
|
@ -19,6 +19,10 @@ export default {
|
||||||
name: "ToggleSwitch",
|
name: "ToggleSwitch",
|
||||||
emits: ['input'],
|
emits: ['input'],
|
||||||
props: {
|
props: {
|
||||||
|
id: {
|
||||||
|
type: String,
|
||||||
|
},
|
||||||
|
|
||||||
value: {
|
value: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
|
|
Loading…
Reference in a new issue