make skeleton loader spinner easier to see

This commit is contained in:
Michael Freno
2026-01-12 14:20:45 -05:00
parent e035f3ddc3
commit 0286fae8aa
2 changed files with 5 additions and 4 deletions

View File

@@ -11,7 +11,7 @@ export function SkeletonBox(props: SkeletonProps) {
aria-label="Loading..." aria-label="Loading..."
role="status" role="status"
> >
<Spinner size="md" /> <Spinner size="md" inverse />
</div> </div>
); );
} }
@@ -23,7 +23,7 @@ export function SkeletonText(props: SkeletonProps) {
aria-label="Loading..." aria-label="Loading..."
role="status" role="status"
> >
<Spinner size="sm" /> <Spinner size="sm" inverse />
</div> </div>
); );
} }

View File

@@ -1,4 +1,4 @@
import { onMount, onCleanup, createSignal, JSX } from "solid-js"; import { onMount, onCleanup, createSignal } from "solid-js";
import { isServer } from "solid-js/web"; import { isServer } from "solid-js/web";
const spinnerChars = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"]; const spinnerChars = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"];
@@ -7,6 +7,7 @@ export interface SpinnerProps {
size?: "sm" | "md" | "lg" | "xl" | number; size?: "sm" | "md" | "lg" | "xl" | number;
class?: string; class?: string;
"aria-label"?: string; "aria-label"?: string;
inverse: boolean;
} }
const sizeMap = { const sizeMap = {
@@ -47,7 +48,7 @@ export function Spinner(props: SpinnerProps) {
return ( return (
<span <span
class={`text-crust font-mono ${sizeClass()} ${props.class || ""}`} class={`font-mono ${sizeClass()} ${props.class || ""} ${props.inverse ? "text-text" : "text-crust"}`}
style={style()} style={style()}
aria-label={props["aria-label"] || "Loading..."} aria-label={props["aria-label"] || "Loading..."}
role="status" role="status"