import { IconDefinition, faCheck, faInfoCircle, faTimesCircle, faTriangleExclamation, } from '@fortawesome/free-solid-svg-icons'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import React, { ReactNode } from 'react'; import { classList } from '../utilities/cssClasses'; import styles from './alert.module.scss'; export enum AlertTypes { Note = 'note', Success = 'success', Warning = 'warning', Danger = 'danger', } interface Props { children: ReactNode; className?: string; title?: string; type: AlertTypes; } const AlertIcons: Record = { [AlertTypes.Note]: faInfoCircle, [AlertTypes.Success]: faCheck, [AlertTypes.Warning]: faTriangleExclamation, [AlertTypes.Danger]: faTimesCircle, }; export const Alert = ({ children, className, title, type }: Props) => { return (
{title &&

{title}

}
{children}
); };