"use client" import * as React from "react" import { Example, ExampleWrapper, } from "@/registry/bases/base/components/example" import { Avatar, AvatarFallback, AvatarImage, } from "@/registry/bases/base/ui/avatar" import { Button } from "@/registry/bases/base/ui/button" import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, DialogTrigger, } from "@/registry/bases/base/ui/dialog" import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, } from "@/registry/bases/base/ui/dropdown-menu" import { IconPlaceholder } from "@/app/(create)/components/icon-placeholder" export default function DropdownMenuExample() { return ( ) } function DropdownMenuBasic() { return ( } > Open My Account Profile Billing Settings GitHub Support API ) } function DropdownMenuSides() { return ( {( [ "inline-start", "left", "top", "bottom", "right", "inline-end", ] as const ).map((side) => ( } > {side.replace("-", " ")} Profile Billing Settings ))} ) } function DropdownMenuWithIcons() { return ( } > Open Profile Billing Settings Log out ) } function DropdownMenuWithShortcuts() { return ( } > Open My Account Profile ⇧⌘P Billing ⌘B Settings ⌘S Keyboard shortcuts ⌘K Log out ⇧⌘Q ) } function DropdownMenuWithSubmenu() { return ( } > Open Team Invite users Email Message More... New Team ⌘+T ) } function DropdownMenuWithCheckboxes() { const [showStatusBar, setShowStatusBar] = React.useState(true) const [showActivityBar, setShowActivityBar] = React.useState(false) const [showPanel, setShowPanel] = React.useState(false) return ( } > Checkboxes Appearance Status Bar Activity Bar Panel ) } function DropdownMenuWithRadio() { const [position, setPosition] = React.useState("bottom") return ( } > Radio Group Panel Position Top Bottom Right ) } function DropdownMenuWithCheckboxesIcons() { const [notifications, setNotifications] = React.useState({ email: true, sms: false, push: true, }) return ( } > Notifications Notification Preferences setNotifications({ ...notifications, email: checked === true }) } > Email notifications setNotifications({ ...notifications, sms: checked === true }) } > SMS notifications setNotifications({ ...notifications, push: checked === true }) } > Push notifications ) } function DropdownMenuWithRadioIcons() { const [paymentMethod, setPaymentMethod] = React.useState("card") return ( } > Payment Method Select Payment Method Credit Card PayPal Bank Transfer ) } function DropdownMenuWithDestructive() { return ( } > Actions Edit Share Archive Delete ) } function DropdownMenuWithAvatar() { const menuContent = ( <> Account Billing Notifications Sign Out > ) return ( } > CN shadcn shadcn@example.com {menuContent} } > LR {menuContent} ) } function DropdownMenuInDialog() { return ( }> Open Dialog Dropdown Menu Example Click the button below to see the dropdown menu. } > Open Menu Copy Cut Paste More Options Save Page... Create Shortcut... Name Window... Developer Tools Delete ) } function DropdownMenuWithInset() { const [showBookmarks, setShowBookmarks] = React.useState(true) const [showUrls, setShowUrls] = React.useState(false) const [theme, setTheme] = React.useState("system") return ( } > Open Actions Copy Cut Paste Appearance Bookmarks Full URLs Theme Light Dark System More Options Save Page... Create Shortcut... ) } function DropdownMenuComplex() { const [showSidebar, setShowSidebar] = React.useState(true) const [showStatusBar, setShowStatusBar] = React.useState(false) return ( } > Complex Menu My Account Profile ⇧⌘P Billing ⌘B Settings ⌘S View Sidebar Status Bar Invite Users Email Message More... Support Sign Out ⇧⌘Q ) }