mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-05-14 15:00:54 -05:00
21 lines
422 B
TypeScript
21 lines
422 B
TypeScript
import classNames from "classnames";
|
|
import { AlertIcon } from "./icons/Alert";
|
|
|
|
export function Alert(props: {
|
|
children: React.ReactNode;
|
|
type: "warning" | "info";
|
|
className?: string;
|
|
"data-cy"?: string;
|
|
}) {
|
|
return (
|
|
<div
|
|
data-type={props.type}
|
|
className={classNames("alert", props.className)}
|
|
data-cy={props["data-cy"]}
|
|
>
|
|
<AlertIcon />
|
|
{props.children}
|
|
</div>
|
|
);
|
|
}
|