import styles from "../styles/exos/Alert.module.scss"; import { HiOutlineTrash } from "react-icons/hi"; import { AlertType, useAlert } from "../context/alert.context.js"; import { colors, parseClassName } from "../utils/utils.js"; import { css, Global, keyframes } from "@emotion/react"; import chroma from "chroma-js"; function Alert({ alert, onClose }) { const alertTypesClasses = { [AlertType.Warning]: styles["alert-warning"], }; const alertTypeIcons = { [AlertType.Warning]: , }; const colorClose = chroma("#0D0221"); const colorValid = chroma(colors.red); return ( <>
{alertTypeIcons[alert.type]} {alert.title}
×
{alert.message}
{" "}
{ onClose(); }} >
); } export default Alert;