Added optional id attribute to ToggleSwitch.

This commit is contained in:
Fabio Manganiello 2023-12-09 16:12:08 +01:00
parent 4b578c38c8
commit 34e2a59285
Signed by: blacklight
GPG key ID: D90FBA7F76362774

View file

@ -1,7 +1,7 @@
<template>
<div class="power-switch" :class="{disabled: disabled}" @click.stop="onInput">
<!--suppress HtmlFormInputWithoutLabel -->
<input type="checkbox" :checked="value">
<input type="checkbox" :checked="value" :id="id">
<label>
<!--suppress HtmlUnknownTag -->
<div class="switch">
@ -19,6 +19,10 @@ export default {
name: "ToggleSwitch",
emits: ['input'],
props: {
id: {
type: String,
},
value: {
type: Boolean,
default: false,