mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-08 01:27:31 +00:00
23 lines
659 B
TypeScript
23 lines
659 B
TypeScript
import Notification, { TNotification } from "./Notification";
|
|
|
|
interface NoticationsProps {
|
|
notifications: Required<TNotification>[];
|
|
clearNotification: (text: string) => void;
|
|
}
|
|
|
|
const Notifications = ({ notifications, clearNotification }: NoticationsProps) => {
|
|
if (!notifications.length) {
|
|
return null;
|
|
}
|
|
|
|
return (
|
|
<div className="pointer-events-none fixed right-2 bottom-2 z-[100] hidden h-full w-96 gap-y-2 md:flex md:flex-col-reverse">
|
|
{notifications.map((notif) => (
|
|
<Notification key={notif.text} notification={notif} clearNotification={clearNotification} />
|
|
))}
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default Notifications;
|