LoadingScreen.tsx
⎇
Raw
1import { SpinnerSVG } from "./SVG";
2import "./LoadingScreen.css";
3export function LoadingSpinner(props: { center: boolean }) {
4 return (
5 <div
6 class="loading-spinner-wrapper"
7 style={{ "place-items": props.center ? "center" : "start", "place-content": "center" }}
8 >
9 <div class="loading-spinner">
10 <SpinnerSVG />
11 </div>
12 </div>
13 );
14}
15export function LoadingScreen(props: { text?: string }) {
16 return (
17 <div class="loading-screen">
18 {props.text && <span>{props.text}</span>}
19 <LoadingSpinner center={!props.text} />
20 </div>
21 );
22}
23