import classes from "./classes.module.scss"; import classNames from "classnames"; import { InformationCircleIcon, ExclamationTriangleIcon } from "@heroicons/react/24/outline"; import Typography, { ITypo } from "@Front/Components/DesignSystem/Typography"; export type IProps = { type: "info" | "warning" | "success" | "error"; children?: React.ReactNode; className?: string; }; export default function MessageBox(props: IProps) { const { className, type, children } = props; return (
{getIcon(type)}
{children}
); function getIcon(type: IProps["type"]) { switch (type) { case "info": return ; case "warning": return ; case "success": return ; case "error": return ; } } }