mirror of
https://github.com/romancm/gamebrary
synced 2024-11-15 07:57:19 +00:00
Added label prop to toggleswitch
This commit is contained in:
parent
3af44f5b27
commit
820d48111f
1 changed files with 11 additions and 0 deletions
|
@ -1,5 +1,7 @@
|
||||||
<template lang="html">
|
<template lang="html">
|
||||||
<span class="toggle-switch">
|
<span class="toggle-switch">
|
||||||
|
<p v-if="label">{{ label }}</p>
|
||||||
|
|
||||||
<input
|
<input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
:id="id"
|
:id="id"
|
||||||
|
@ -15,6 +17,7 @@ export default {
|
||||||
props: {
|
props: {
|
||||||
value: Boolean,
|
value: Boolean,
|
||||||
id: String,
|
id: String,
|
||||||
|
label: String,
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
|
@ -43,6 +46,14 @@ export default {
|
||||||
.toggle-switch {
|
.toggle-switch {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin: 0;
|
||||||
|
font-size: 12px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
input[type=checkbox]{
|
input[type=checkbox]{
|
||||||
height: 0;
|
height: 0;
|
||||||
width: 0;
|
width: 0;
|
||||||
|
|
Loading…
Reference in a new issue