Files
please-pay-me/web/src/components/ui/Flash.tsx
T
2026-09-21 04:06:43 +03:00

15 lines
409 B
TypeScript

type Props = {
error?: string | null;
notice?: string | null;
};
export function Flash({ error = null, notice = null }: Props) {
if (!error && !notice) return null;
return (
<div className="flash" aria-live="polite">
{error ? <p className="flash__item flash__item--error">{error}</p> : null}
{notice ? <p className="flash__item flash__item--ok">{notice}</p> : null}
</div>
);
}