Skip to content

Commit 5982ebe

Browse files
author
Niels Bosman
committed
Cleanup
1 parent befb240 commit 5982ebe

File tree

2 files changed

+493
-62
lines changed

2 files changed

+493
-62
lines changed

src/components/VueToggle.vue

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
11
<template>
2-
<section class="wrapper">
3-
<input
4-
:id="id"
5-
v-model="toggled"
6-
:name="name"
7-
class="toggle"
8-
type="checkbox"
9-
@click="toggle()"
10-
/>
2+
<section class="wrapper" :title="title">
3+
<input :id="id" :name="name" v-model="toggled" class="toggle" type="checkbox" @click="toggled = !toggled" />
114
<label :for="id" class="toggler" />
12-
<span class="title" @click="toggle()" v-text="title" />
5+
<span class="title" v-text="title" @click="toggled = !toggled" />
136
</section>
147
</template>
158

@@ -27,12 +20,6 @@ export default {
2720
data() {
2821
return { toggled: false }
2922
},
30-
31-
methods: {
32-
toggle() {
33-
this.toggled = !this.toggled
34-
},
35-
},
3623
}
3724
</script>
3825

0 commit comments

Comments
 (0)