@enso-ui/switch 2.0.6 → 2.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enso-ui/switch",
3
- "version": "2.0.6",
3
+ "version": "2.0.8",
4
4
  "description": "Vue Switch",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1,5 +1,9 @@
1
1
  <template>
2
2
  <label class="vue-switch">
3
+ <label class="control-label"
4
+ @click="toggle">
5
+ <slot name="before"/>
6
+ </label>
3
7
  <input class="checkbox"
4
8
  type="checkbox"
5
9
  :value="modelValue"
@@ -13,7 +17,7 @@
13
17
  @click="toggle"/>
14
18
  <label class="control-label"
15
19
  @click="toggle">
16
- <slot/>
20
+ <slot name="after"/>
17
21
  </label>
18
22
  </label>
19
23
  </template>
@@ -38,6 +42,8 @@ export default {
38
42
  },
39
43
  },
40
44
 
45
+ emits: ['update:modelValue'],
46
+
41
47
  methods: {
42
48
  toggle() {
43
49
  if (!this.disabled && !this.readonly) {
@@ -117,7 +123,6 @@ export default {
117
123
  }
118
124
 
119
125
  .control-label {
120
- padding-left: 0.5rem;
121
126
  cursor: pointer;
122
127
  font-size: calc(0.9 * var(--height));
123
128
  }