font control args to allow passing an option list of fonts, for future use

This commit is contained in:
Henry Jameson 2018-11-25 22:39:06 +03:00
parent 707441ffe6
commit 1087741b0d
2 changed files with 16 additions and 10 deletions

View file

@ -17,7 +17,7 @@
v-model="preset"
class="font-switcher"
id="name + '-font-switcher'">
<option v-for="option in options" :value="option">
<option v-for="option in availableOptions" :value="option">
{{ option }}
</option>
</select>
@ -37,11 +37,19 @@ import { set } from 'vue'
export default {
props: [
'name', 'label', 'value', 'fallback', 'options'
'name', 'label', 'value', 'fallback', 'options', 'no-inherit'
],
data () {
return {
lValue: this.value
lValue: this.value,
availableOptions: [
this.noInherit ? '' : 'inherit',
'custom',
...(this.options || []),
'serif',
'monospace',
'sans-serif'
].filter(_ => _)
}
},
beforeUpdate () {