From 4bc421527f251426ff2c32b81bae989025825a95 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Mon, 17 Jan 2022 16:31:13 +0100 Subject: [PATCH] also add extra classes to legacy spinner --- src/platform/web/ui/common.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/platform/web/ui/common.js b/src/platform/web/ui/common.js index 15a522c7..5551ed09 100644 --- a/src/platform/web/ui/common.js +++ b/src/platform/web/ui/common.js @@ -20,15 +20,16 @@ export function spinner(t, extraClasses = undefined) { if (container === undefined) { container = document.querySelector(".hydrogen"); } + const classes = Object.assign({"spinner": true}, extraClasses); if (container?.classList.contains("legacy")) { - return t.div({className: "spinner"}, [ + return t.div({className: classes}, [ t.div(), t.div(), t.div(), t.div(), ]); } else { - return t.svg({className: Object.assign({"spinner": true}, extraClasses), viewBox:"0 0 100 100"}, + return t.svg({className: classes, viewBox:"0 0 100 100"}, t.circle({cx:"50%", cy:"50%", r:"45%", pathLength:"100"}) ); }