From 8216d88b4039eec23db054c0118a0ba4b3ef5837 Mon Sep 17 00:00:00 2001 From: John Doe Date: Wed, 13 Sep 2023 21:09:58 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=89=20Implemented=20CurrencyDropdown?= =?UTF-8?q?=20component=20=F0=9F=9A=80=20Added=20CurrencyDropdown=20compon?= =?UTF-8?q?ent=20for=20selecting=20currencies=20=F0=9F=94=A7=20Updated=20s?= =?UTF-8?q?tyling=20for=20currency=20selection=20=F0=9F=93=A6=20Integrated?= =?UTF-8?q?=20Popover=20and=20Transition=20components=20=F0=9F=92=A1=20Imp?= =?UTF-8?q?roved=20code=20readability=20and=20maintainability?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../(Header)/CurrencyDropdown.tsx | 104 ++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 src/app/(client-components)/(Header)/CurrencyDropdown.tsx diff --git a/src/app/(client-components)/(Header)/CurrencyDropdown.tsx b/src/app/(client-components)/(Header)/CurrencyDropdown.tsx new file mode 100644 index 0000000..ebd68bf --- /dev/null +++ b/src/app/(client-components)/(Header)/CurrencyDropdown.tsx @@ -0,0 +1,104 @@ +"use client"; + +import { Popover, Transition } from "@headlessui/react"; +import { ChevronDownIcon } from "@heroicons/react/24/solid"; +import { + CurrencyDollarIcon, + CurrencyBangladeshiIcon, + CurrencyEuroIcon, + CurrencyPoundIcon, + CurrencyRupeeIcon, + BanknotesIcon, +} from "@heroicons/react/24/outline"; +import { Fragment } from "react"; + +export const headerCurrency = [ + { + id: "EUR", + name: "EUR", + href: "##", + icon: CurrencyEuroIcon, + active: true, + }, + { + id: "USD", + name: "USD", + href: "##", + icon: CurrencyDollarIcon, + }, + { + id: "GBF", + name: "GBF", + href: "##", + icon: CurrencyBangladeshiIcon, + }, + { + id: "SAR", + name: "SAR", + href: "##", + icon: CurrencyPoundIcon, + }, + { + id: "QAR", + name: "QAR", + href: "##", + icon: CurrencyRupeeIcon, + }, +]; + +export default function CurrencyDropdown() { + return ( +
+ + {({ open, close }) => ( + <> + + + Currency + + + + + + + + )} + +
+ ); +}