From 1087741b0df00d42576c55f5869d331469bcbb6e Mon Sep 17 00:00:00 2001
From: Henry Jameson <me@hjkos.com>
Date: Sun, 25 Nov 2018 22:39:06 +0300
Subject: font control args to allow passing an option list of fonts, for
 future use

---
 src/components/font_control/font_control.vue | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

(limited to 'src/components/font_control/font_control.vue')

diff --git a/src/components/font_control/font_control.vue b/src/components/font_control/font_control.vue
index 424f6259..004b5546 100644
--- a/src/components/font_control/font_control.vue
+++ b/src/components/font_control/font_control.vue
@@ -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 () {
-- 
cgit v1.2.3-70-g09d2

