diff --git a/frontend/components/context/Notifications/Notification.tsx b/frontend/components/context/Notifications/Notification.tsx new file mode 100644 index 000000000..974843cf6 --- /dev/null +++ b/frontend/components/context/Notifications/Notification.tsx @@ -0,0 +1,38 @@ +import { faXmarkCircle } from "@fortawesome/free-solid-svg-icons"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import classnames from "classnames"; + +import { Notification as NotificationType } from "./NotificationProvider"; + +interface NotificationProps { + notification: NotificationType; + clearNotification: (text?: string) => void; +} + +const Notification = ({ + notification, + clearNotification, +}: NotificationProps) => { + return ( +
+

{notification.text}

+ +
+ ); +}; + +export default Notification; diff --git a/frontend/components/context/Notifications/Notifications.tsx b/frontend/components/context/Notifications/Notifications.tsx new file mode 100644 index 000000000..856331e24 --- /dev/null +++ b/frontend/components/context/Notifications/Notifications.tsx @@ -0,0 +1,28 @@ +import Notification from "./Notification"; +import { Notification as NotificationType } from "./NotificationProvider"; + +interface NoticationsProps { + notifications: NotificationType[]; + clearNotification: (text?: string) => void; +} + +const Notifications = ({ + notifications, + clearNotification, +}: NoticationsProps) => { + return ( +
+
+ {notifications.map((notif) => ( + + ))} +
+
+ ); +}; + +export default Notifications;