toggle-components-library 1.13.0 → 1.13.1

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": "toggle-components-library",
3
- "version": "1.13.0",
3
+ "version": "1.13.1",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <ToggleInputSelect :options="fontOptions" :label="label" :name="name" :fontFamily="fontValue" v-model="fontValue" size="medium" :style="`font-family: ${fontValue};`"/>
2
+ <ToggleInputSelect :options="fontOptions" :label="label" :name="name" :fontFamily="inputVal" v-model="inputVal" size="medium" :style="`font-family: ${inputVal};`"/>
3
3
  </template>
4
4
 
5
5
  <script>
@@ -12,6 +12,9 @@ export default {
12
12
  components:{ ToggleInputSelect },
13
13
  name: 'FontPicker',
14
14
  props: {
15
+ value: {
16
+ type: String
17
+ },
15
18
  /**
16
19
  * The name of the fontpicker component
17
20
  */
@@ -37,7 +40,6 @@ export default {
37
40
  },
38
41
  data() {
39
42
  return {
40
- fontValue: '',
41
43
  fonts: [
42
44
  'Abril Fatface',
43
45
  'Alpha Slab One',
@@ -86,16 +88,25 @@ export default {
86
88
  label: font
87
89
  }
88
90
  })
91
+ },
92
+ inputVal: {
93
+ get() {
94
+ return this.value;
95
+ },
96
+
97
+ set(value) {
98
+ this.$emit('input', value);
99
+ }
89
100
  }
90
101
  },
91
102
 
92
103
  methods: {
93
104
  getFonts() {
94
- WebFont.load({
95
- google: {
96
- families: this.fonts
97
- }
98
- });
105
+ WebFont.load({
106
+ google: {
107
+ families: this.fonts
108
+ }
109
+ });
99
110
  }
100
111
  }
101
112
  }