Added label prop to toggleswitch

This commit is contained in:
Roman Cervantes 2018-11-24 20:47:57 -07:00
parent 3af44f5b27
commit 820d48111f

View file

@ -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;