sendou.ink/app/components/Alert.tsx
2021-12-07 00:57:06 +02:00

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>
);
}