forked from quic-issues/427e7578-d7bf-49c8-aee9-2dd999e25316
p2p poll logic added
This commit is contained in:
22
components/Notification.tsx
Normal file
22
components/Notification.tsx
Normal file
@@ -0,0 +1,22 @@
|
||||
"use client";
|
||||
|
||||
type NotificationType = "info" | "success" | "error";
|
||||
|
||||
interface NotificationProps {
|
||||
message: string;
|
||||
type?: NotificationType;
|
||||
}
|
||||
|
||||
export default function Notification({ message, type = "info" }: NotificationProps) {
|
||||
const colors: Record<NotificationType, string> = {
|
||||
info: "bg-blue-100 text-blue-700",
|
||||
success: "bg-green-100 text-green-700",
|
||||
error: "bg-red-100 text-red-700",
|
||||
};
|
||||
|
||||
return (
|
||||
<div className={`px-4 py-2 rounded shadow ${colors[type]}`}>
|
||||
{message}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user