From 3922d89032c01626085db30f84ac1d0258f9476e Mon Sep 17 00:00:00 2001 From: lesion Date: Thu, 13 Jan 2022 21:52:20 +0100 Subject: [PATCH] add theme attribute to gancio-events webcomponent --- nuxt.config.js | 2 +- webcomponents/src/GancioEvents.svelte | 38 ++++++++++++++++++++------- 2 files changed, 30 insertions(+), 10 deletions(-) diff --git a/nuxt.config.js b/nuxt.config.js index 7e8a3a85..54a86ff4 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -32,7 +32,7 @@ module.exports = { ** Global CSS */ css: [ - 'vuetify/dist/vuetify.min.css', + 'vuetify/dist/vuetify.min.css', '@mdi/font/css/materialdesignicons.css', '@/assets/style.less' ], diff --git a/webcomponents/src/GancioEvents.svelte b/webcomponents/src/GancioEvents.svelte index 6244d64d..2419e5d9 100644 --- a/webcomponents/src/GancioEvents.svelte +++ b/webcomponents/src/GancioEvents.svelte @@ -5,6 +5,7 @@ export let maxlength = false export let tags = '' export let places = '' + export let theme = 'light' let mounted = false let events = [] @@ -29,6 +30,9 @@ .then(e => { events = e }) + .catch(e => { + console.error('Error loading Gancio API -> ', e) + }) } @@ -49,12 +53,12 @@ mounted = true update() }) - $: update(maxlength && title && places && tags) + $: update(maxlength && title && places && tags && theme) {#if events.length} -