also add extra classes to legacy spinner
This commit is contained in:
parent
05d23cc745
commit
4bc421527f
1 changed files with 3 additions and 2 deletions
|
@ -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"})
|
||||
);
|
||||
}
|
||||
|
|
Reference in a new issue