import { cn } from './cn.ts' import { messageOf } from './errors.ts' interface Props { /** An error or its message. Nothing renders when there is none. */ error: unknown className?: string } export function ErrorAlert(props: Props) { if (!props.error) return null return (
{messageOf(props.error)}
) }