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">
|
||||
<span class="toggle-switch">
|
||||
<p v-if="label">{{ label }}</p>
|
||||
|
||||
<input
|
||||
type="checkbox"
|
||||
:id="id"
|
||||
|
@ -15,6 +17,7 @@ export default {
|
|||
props: {
|
||||
value: Boolean,
|
||||
id: String,
|
||||
label: String,
|
||||
},
|
||||
|
||||
data() {
|
||||
|
@ -43,6 +46,14 @@ export default {
|
|||
.toggle-switch {
|
||||
display: inline-flex;
|
||||
|
||||
p {
|
||||
margin: 0;
|
||||
font-size: 12px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
input[type=checkbox]{
|
||||
height: 0;
|
||||
width: 0;
|
||||
|
|
Loading…
Reference in a new issue