import { cn } from "@lume/utils"; import type { ReactNode } from "react"; export function Spinner({ children, className, }: { children?: ReactNode; className?: string; }) { const spinner = ( ); if (children === undefined) return spinner; return (
{/** * `display: contents` removes the content from the accessibility tree in some browsers, * so we force remove it with `aria-hidden` */} {children}
{spinner}
); }