feat: add notif type

This commit is contained in:
asharonbaltazar
2022-12-07 12:15:17 -05:00
parent 9e1112eb52
commit 91c8fd14df
2 changed files with 2 additions and 1 deletions

View File

@@ -42,6 +42,7 @@ const Notification = ({
{
"bg-green-600": notification.type === "success",
"bg-red-500": notification.type === "error",
"bg-blue-500": notification.type === "info",
}
)}
role="alert"

View File

@@ -2,7 +2,7 @@ import { createContext, ReactNode, useContext, useState } from "react";
import Notifications from "./Notifications";
type NotificationType = "success" | "error";
type NotificationType = "success" | "error" | "info";
export type Notification = {
text: string;