From 7d7ccf729855283ad0f5b9d6943b8d86ed1f180d Mon Sep 17 00:00:00 2001
From: Henry Jameson <me@hjkos.com>
Date: Sun, 19 Jan 2020 22:44:35 +0200
Subject: fix some contrast ratios not displaying

---
 src/components/contrast_ratio/contrast_ratio.vue | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

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

diff --git a/src/components/contrast_ratio/contrast_ratio.vue b/src/components/contrast_ratio/contrast_ratio.vue
index 15a450a2..5e79ef41 100644
--- a/src/components/contrast_ratio/contrast_ratio.vue
+++ b/src/components/contrast_ratio/contrast_ratio.vue
@@ -37,9 +37,15 @@
 
 <script>
 export default {
-  props: [
-    'large', 'contrast'
-  ],
+  props: {
+    large: {
+      required: false
+    },
+    contrast: {
+      required: true,
+      type: Object
+    }
+  },
   computed: {
     hint () {
       const levelVal = this.contrast.aaa ? 'aaa' : (this.contrast.aa ? 'aa' : 'bad')
-- 
cgit v1.2.3-70-g09d2


From 6a3714fcc64fe25e6fc38a700083427c2764caec Mon Sep 17 00:00:00 2001
From: Henry Jameson <me@hjkos.com>
Date: Mon, 20 Jan 2020 00:37:45 +0200
Subject: Checked contrast rating errors

---
 src/components/contrast_ratio/contrast_ratio.vue | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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

diff --git a/src/components/contrast_ratio/contrast_ratio.vue b/src/components/contrast_ratio/contrast_ratio.vue
index 5e79ef41..ba92bc17 100644
--- a/src/components/contrast_ratio/contrast_ratio.vue
+++ b/src/components/contrast_ratio/contrast_ratio.vue
@@ -41,8 +41,10 @@ export default {
     large: {
       required: false
     },
+    // TODO: Make theme switcher compute theme initially so that contrast
+    // component won't be called without contrast data
     contrast: {
-      required: true,
+      required: false,
       type: Object
     }
   },
-- 
cgit v1.2.3-70-g09d2

