eCourt-note/components/wordaddin/Spinner.tsx

14 lines
767 B
TypeScript
Raw Normal View History

2026-10-16 12:07:25 +07:00
import { LoaderCircle } from "lucide-react";
/** Genesis Spinner — แทน Spinner ของ Fluent UI v9 ต้นฉบับ (ใช้ไอคอนหมุนของ lucide)
* role="status" ให้ progressMessage ที่เปลี่ยนตลอด flow ถูกประกาศแบบ polite (WCAG 4.1.3) */
export function Spinner({ label, className = "" }: { label?: string; className?: string }) {
return (
<span role="status" className={`inline-flex items-center gap-2 text-sm text-ink-soft ${className}`}>
<LoaderCircle className="size-4 animate-spin" aria-hidden />
{label ? <span>{label}</span> : null}
{!label ? <span className="sr-only">กำลังโหลด…</span> : null}
</span>
);
}