sendou.ink/app/components/FormMessage.tsx
2026-01-18 18:21:19 +02:00

30 lines
469 B
TypeScript

import clsx from "clsx";
import type * as React from "react";
export function FormMessage({
children,
type,
className,
spaced = true,
id,
}: {
children: React.ReactNode;
type: "error" | "info";
className?: string;
spaced?: boolean;
id?: string;
}) {
return (
<div
id={id}
className={clsx(
{ "info-message": type === "info", "error-message": type === "error" },
{ "no-margin": !spaced },
className,
)}
>
{children}
</div>
);
}