mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
also add extra classes to legacy spinner
This commit is contained in:
parent
05d23cc745
commit
4bc421527f
@ -20,15 +20,16 @@ export function spinner(t, extraClasses = undefined) {
|
|||||||
if (container === undefined) {
|
if (container === undefined) {
|
||||||
container = document.querySelector(".hydrogen");
|
container = document.querySelector(".hydrogen");
|
||||||
}
|
}
|
||||||
|
const classes = Object.assign({"spinner": true}, extraClasses);
|
||||||
if (container?.classList.contains("legacy")) {
|
if (container?.classList.contains("legacy")) {
|
||||||
return t.div({className: "spinner"}, [
|
return t.div({className: classes}, [
|
||||||
t.div(),
|
t.div(),
|
||||||
t.div(),
|
t.div(),
|
||||||
t.div(),
|
t.div(),
|
||||||
t.div(),
|
t.div(),
|
||||||
]);
|
]);
|
||||||
} else {
|
} 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"})
|
t.circle({cx:"50%", cy:"50%", r:"45%", pathLength:"100"})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user