From eb58317c1f5df31257c93d5091d08b652174ba9a Mon Sep 17 00:00:00 2001 From: John Doe Date: Wed, 13 Sep 2023 20:59:55 +0300 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Added=20NotifyDropdown=20component?= =?UTF-8?q?=20=F0=9F=9A=80=20Implemented=20notifications=20display=20?= =?UTF-8?q?=F0=9F=8C=9F=20Enhanced=20user=20avatars=20=F0=9F=93=9D=20Updat?= =?UTF-8?q?ed=20NotifyDropdown=20layout=20=F0=9F=94=84=20Refactored=20Popo?= =?UTF-8?q?ver=20logic=20=F0=9F=A9=B9=20Fixed=20minor=20styling=20issues?= =?UTF-8?q?=20=F0=9F=93=A6=20Initial=20commit=20for=20NotifyDropdown=20fea?= =?UTF-8?q?ture?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../(Header)/NotifyDropdown.tsx | 101 ++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 src/app/(client-components)/(Header)/NotifyDropdown.tsx diff --git a/src/app/(client-components)/(Header)/NotifyDropdown.tsx b/src/app/(client-components)/(Header)/NotifyDropdown.tsx new file mode 100644 index 0000000..55ae010 --- /dev/null +++ b/src/app/(client-components)/(Header)/NotifyDropdown.tsx @@ -0,0 +1,101 @@ +"use client"; + +import { Popover, Transition } from "@headlessui/react"; +import { FC, Fragment } from "react"; +import Avatar from "@/shared/Avatar"; +import { BellIcon } from "@heroicons/react/24/outline"; +import avatar4 from "@/images/avatars/Image-4.png"; +import avatar5 from "@/images/avatars/Image-5.png"; +import avatar6 from "@/images/avatars/Image-6.png"; + +const notifications = [ + { + name: "Eden Tuan", + description: "Measure actions your users take", + time: "3 minutes ago", + href: "##", + avatar: avatar4, + }, + { + name: "Leo Messi", + description: "Create your own targeted content", + time: "1 minute ago", + href: "##", + avatar: avatar5, + }, + { + name: "Leo Kante", + description: "Keep track of your growth", + time: "3 minutes ago", + href: "##", + avatar: avatar6, + }, +]; + +interface Props { + className?: string; +} + +const NotifyDropdown: FC = ({ className = "" }) => { + return ( + <> + + {({ open }) => ( + <> + + + + + + +
+
+

Notifications

+ {notifications.map((item, index) => ( + + +
+

+ {item.name} +

+

+ {item.description} +

+

+ {item.time} +

+
+ +
+ ))} +
+
+
+
+ + )} +
+ + ); +}; + +export default NotifyDropdown;