hellth-hub/apps/admin/app/(authed)/einstellungen/_components/status-banner.tsx

30 lines
547 B
TypeScript
Raw Permalink Normal View History

"use client";
export function StatusBanner({
status,
error,
}: {
status: string | null;
error: string | null;
}) {
if (!status && !error) return null;
if (error) {
return (
<div
role="alert"
className="rounded-xl border border-red-200 bg-red-50 px-4 py-3 text-sm text-red-700"
>
{error}
</div>
);
}
return (
<div
role="status"
className="rounded-xl border border-emerald-200 bg-emerald-50 px-4 py-3 text-sm text-emerald-700"
>
{status}
</div>
);
}