mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-10-14 17:54:42 +00:00
22 lines
621 B
TypeScript
22 lines
621 B
TypeScript
interface AuthErrorAlertProps {
|
|
message: string;
|
|
/** Per-field messages to list beneath the summary. */
|
|
details?: readonly string[];
|
|
}
|
|
|
|
const AuthErrorAlert = ({ message, details }: AuthErrorAlertProps) => (
|
|
<div role="alert" className="alert alert-error alert-soft flex-col items-start">
|
|
<span>{message}</span>
|
|
|
|
{details?.length ? (
|
|
<ul className="list-inside list-disc text-sm">
|
|
{details.map((detail) => (
|
|
<li key={detail}>{detail}</li>
|
|
))}
|
|
</ul>
|
|
) : null}
|
|
</div>
|
|
);
|
|
|
|
export default AuthErrorAlert;
|