mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-10-01 15:48:23 -05:00
Move app to apps/web-react in pnpm workspace layout
This commit is contained in:
30
apps/web-react/app/components/FormMessage.tsx
Normal file
30
apps/web-react/app/components/FormMessage.tsx
Normal file
@@ -0,0 +1,30 @@
|
||||
import clsx from "clsx";
|
||||
import type * as React from "react";
|
||||
import styles from "./FormMessage.module.css";
|
||||
|
||||
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(
|
||||
{ [styles.info]: type === "info", [styles.error]: type === "error" },
|
||||
{ [styles.noMargin]: !spaced },
|
||||
className,
|
||||
)}
|
||||
>
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user