{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "navbar-09", "type": "registry:block", "dependencies": [ "lucide-react" ], "registryDependencies": [ "utils", "navigation-menu", "button", "separator", "select", "popover" ], "files": [ { "path": "registry/default/blocks/navbar/navbar-09.tsx", "content": "'use client'\r\n\r\nimport React from 'react'\r\nimport { Button, buttonVariants } from '@/registry/default/ui/button'\r\nimport {\r\n NavigationMenu,\r\n NavigationMenuItem,\r\n NavigationMenuLink,\r\n NavigationMenuList,\r\n} from '@/registry/default/ui/navigation-menu'\r\nimport { Separator } from '@/registry/default/ui/separator'\r\nimport {\r\n Select,\r\n SelectContent,\r\n SelectGroup,\r\n SelectItem,\r\n SelectLabel,\r\n} from '@/registry/default/ui/select'\r\nimport { cn } from '@/lib/utils'\r\nimport { HandbagIcon, SearchIcon } from 'lucide-react'\r\nimport { SelectTrigger } from '@radix-ui/react-select'\r\nimport { MobileNav } from './mobile-nav'\r\n// import Link from 'next/link'\r\n\r\n// Sample navigation links, you can replace these with your actual links\r\n// you can add more categories it will be rendered in mobile nav, but only the first one will be rendered in desktop nav\r\nconst navigationLinks = [\r\n {\r\n name: 'Menu',\r\n items: [\r\n { href: '#', label: 'Men', active: true },\r\n { href: '#', label: 'Women' },\r\n { href: '#', label: 'Kids' },\r\n { href: '#', label: 'Store' },\r\n ],\r\n },\r\n {\r\n name: 'Account',\r\n items: [\r\n { href: '#', label: 'Sign In' },\r\n { href: '#', label: 'Create Account' },\r\n ],\r\n },\r\n]\r\n\r\nconst currencies = [\r\n { id: 'usd', name: 'USD', flag: 'πŸ‡ΊπŸ‡Έ' },\r\n { id: 'eur', name: 'EUR', flag: 'πŸ‡ͺπŸ‡Ί' },\r\n { id: 'gbp', name: 'GBP', flag: 'πŸ‡¬πŸ‡§' },\r\n { id: 'jpy', name: 'JPY', flag: 'πŸ‡―πŸ‡΅' },\r\n { id: 'cad', name: 'CAD', flag: 'πŸ‡¨πŸ‡¦' },\r\n]\r\n\r\nexport default function Navbar() {\r\n const Link = 'a' // if using Next.js remove this line. you can use the Link component from 'next/link'\r\n\r\n const totalItems = 0 // Replace with your logic to get the total number of items in the cart\r\n\r\n const [selectedCurrency, setSelectedCurrency] = React.useState(\r\n currencies[0].id\r\n )\r\n const selectCurrencyItem = currencies.find(\r\n (currency) => currency.id === selectedCurrency\r\n )\r\n\r\n return (\r\n
\r\n

\r\n Get free delivery on orders over $100\r\n

\r\n\r\n
\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n {navigationLinks[0].items.map((link, index) => (\r\n \r\n \r\n {link.label}\r\n \r\n \r\n ))}\r\n \r\n \r\n\r\n
\r\n \r\n Sign-in\r\n \r\n\r\n \r\n\r\n \r\n Create Account\r\n \r\n\r\n \r\n\r\n \r\n \r\n {selectCurrencyItem?.flag}\r\n \r\n {selectCurrencyItem?.name}\r\n \r\n \r\n \r\n \r\n Currency\r\n {currencies.map((currency) => (\r\n \r\n {currency.flag}\r\n {currency.name}\r\n \r\n ))}\r\n \r\n \r\n \r\n\r\n \r\n\r\n {/* search button, create your own search button dialog. or copy it from launchmvpfast components */}\r\n \r\n \r\n Search\r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n {totalItems}\r\n \r\n Open cart\r\n \r\n
\r\n
\r\n
\r\n )\r\n}\r\n", "type": "registry:component", "target": "components/navbar.tsx" }, { "path": "registry/default/blocks/navbar/mobile-nav.tsx", "content": "'use client'\r\n\r\nimport React from 'react'\r\nimport {\r\n Popover,\r\n PopoverContent,\r\n PopoverTrigger,\r\n} from '@/registry/default/ui/popover'\r\nimport { Button } from '@/registry/default/ui/button'\r\nimport { cn } from '@/lib/utils'\r\n// import Link from 'next/link'\r\n\r\ntype MobileNavProps = {\r\n nav: {\r\n name: string\r\n items: {\r\n label: string\r\n href: string\r\n }[]\r\n }[]\r\n}\r\n\r\nexport function MobileNav({ nav }: MobileNavProps) {\r\n const Link = 'a' // if using Next.js remove this line. you can use the Link component from 'next/link'\r\n\r\n const [open, setOpen] = React.useState(false)\r\n\r\n return (\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n Toggle Menu\r\n
\r\n \r\n
\r\n \r\n
\r\n {nav.map((category, index) => (\r\n
\r\n

\r\n {category.name}\r\n

\r\n
\r\n {category.items.map((item, index) => (\r\n setOpen(false)}\r\n >\r\n {item.label}\r\n \r\n ))}\r\n
\r\n
\r\n ))}\r\n
\r\n \r\n
\r\n )\r\n}\r\n", "type": "registry:component", "target": "components/mobile-nav.tsx" } ] }