@benev/praxis
Version:
Multiplayer webgame laboratory
14 lines • 546 B
JavaScript
import { shadowView } from "@benev/slate";
import styleCss from "./style.css.js";
import themeCss from "../../theme.css.js";
import spinnerSvg from "../../../icons/svg-spinners/spinner.svg.js";
export const SpinnerView = shadowView(use => () => {
use.name("spinner");
use.css(themeCss, styleCss);
use.deferOnce(() => {
const speed = 500 + Math.floor(Math.random() * 1000);
use.shadow.querySelector("svg .spin").style.animationDuration = speed + "ms";
});
return spinnerSvg;
});
//# sourceMappingURL=view.js.map