- "content": "import { Press_Start_2P } from \"next/font/google\"\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\"\nimport { cva, VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\nimport {\n DropdownMenu as ShadcnDropdownMenu,\n DropdownMenuContent as ShadcnDropdownMenuContent,\n DropdownMenuGroup as ShadcnDropdownMenuGroup,\n DropdownMenuItem as ShadcnDropdownMenuItem,\n DropdownMenuLabel as ShadcnDropdownMenuLabel,\n DropdownMenuPortal as ShadcnDropdownMenuPortal,\n DropdownMenuSeparator as ShadcnDropdownMenuSeparator,\n DropdownMenuShortcut as ShadcnDropdownMenuShortcut,\n DropdownMenuSub as ShadcnDropdownMenuSub,\n DropdownMenuSubContent as ShadcnDropdownMenuSubContent,\n DropdownMenuSubTrigger as ShadcnDropdownMenuSubTrigger,\n DropdownMenuTrigger as ShadcnDropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\"\n\nconst DropdownMenu = ShadcnDropdownMenu\n\nconst DropdownMenuPortal = ShadcnDropdownMenuPortal\n\nconst DropdownMenuTrigger = ShadcnDropdownMenuTrigger\n\nconst DropdownMenuGroup = ShadcnDropdownMenuGroup\n\nconst DropdownMenuLabel = ShadcnDropdownMenuLabel\n\nconst DropdownMenuSeparator = ShadcnDropdownMenuSeparator\n\nconst DropdownMenuShortcut = ShadcnDropdownMenuShortcut\n\nconst DropdownMenuSub = ShadcnDropdownMenuSub\n\nconst pressStart = Press_Start_2P({\n weight: [\"400\"],\n subsets: [\"latin\"],\n})\n\nfunction DropdownMenuSubTrigger({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.DropdownMenuSubTrigger>) {\n return (\n <ShadcnDropdownMenuSubTrigger\n className={cn(\n \"hover:bg-transparent active:bg-transparent focus:bg-transparent rounded-none border-dashed border-y-4 border-transparent focus:border-foreground hover:border-foreground dark:focus:border-ring bg-transparent data-[state=open]:bg-transparent data-[state=open]:border-foreground dark:data-[state=open]:border-ring\",\n className\n )}\n {...props}\n >\n {children}\n </ShadcnDropdownMenuSubTrigger>\n )\n}\n\nfunction DropdownMenuItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Item>) {\n return (\n <ShadcnDropdownMenuItem\n className={cn(\n \"hover:bg-transparent active:bg-transparent focus:bg-transparent rounded-none border-dashed border-y-4 border-transparent focus:border-foreground hover:border-foreground dark:focus:border-ring bg-transparent\",\n className\n )}\n {...props}\n >\n {children}\n </ShadcnDropdownMenuItem>\n )\n}\n\nexport const dropDownVariants = cva(\"\", {\n variants: {\n font: {\n normal: \"\",\n retro: pressStart.className,\n },\n },\n defaultVariants: {\n font: \"retro\",\n },\n})\n\nfunction DropdownMenuSubContent({\n children,\n className,\n font,\n ...props\n}: BitDropownMenuContentProps) {\n return (\n <ShadcnDropdownMenuSubContent\n {...props}\n className={cn(\n \"bg-popover\",\n font !== \"normal\" && pressStart.className,\n className\n )}\n >\n {children}\n\n <div\n className=\"absolute inset-0 border-x-6 -mx-1.5 border-foreground dark:border-ring pointer-events-none\"\n aria-hidden=\"true\"\n />\n <div\n className=\"absolute inset-0 border-y-6 -my-1.5 border-foreground dark:border-ring pointer-events-none\"\n aria-hidden=\"true\"\n />\n </ShadcnDropdownMenuSubContent>\n )\n}\n\nexport interface BitDropownMenuContentProps\n extends React.ComponentProps<typeof DropdownMenuPrimitive.Content>,\n VariantProps<typeof dropDownVariants> {}\n\nfunction DropdownMenuContent({\n children,\n font,\n className,\n ...props\n}: BitDropownMenuContentProps) {\n return (\n <ShadcnDropdownMenuContent\n className={cn(\n \"bg-popover mt-1 py-2\",\n font !== \"normal\" && pressStart.className,\n className\n )}\n {...props}\n >\n {children}\n\n <div\n className=\"mt-2.5 absolute inset-0 border-x-6 -mx-1.5 border-foreground dark:border-ring pointer-events-none\"\n aria-hidden=\"true\"\n />\n <div\n className=\"mt-1 absolute inset-0 border-y-6 -my-1.5 border-foreground dark:border-ring pointer-events-none\"\n aria-hidden=\"true\"\n />\n </ShadcnDropdownMenuContent>\n )\n}\n\nexport {\n DropdownMenu,\n DropdownMenuPortal,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuLabel,\n DropdownMenuItem,\n DropdownMenuSeparator,\n DropdownMenuSubTrigger,\n DropdownMenuSubContent,\n DropdownMenuShortcut,\n DropdownMenuSub,\n}\n",
0 commit comments