2
2
3
3
import * as React from "react"
4
4
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu"
5
- import {
6
- CheckIcon ,
7
- ChevronRightIcon ,
8
- DotFilledIcon ,
9
- } from "@radix-ui/react-icons"
5
+ import { Check , ChevronRight , Circle } from "lucide-react"
10
6
11
- import { cn } from "src/utils "
7
+ import { cn } from "src"
12
8
13
9
const DropdownMenu = DropdownMenuPrimitive . Root
14
10
@@ -28,6 +24,7 @@ const DropdownMenuTrigger = React.forwardRef<
28
24
) )
29
25
DropdownMenuTrigger . displayName = DropdownMenuPrimitive . Trigger . displayName
30
26
27
+
31
28
const DropdownMenuGroup = DropdownMenuPrimitive . Group
32
29
33
30
const DropdownMenuPortal = DropdownMenuPrimitive . Portal
@@ -45,14 +42,14 @@ const DropdownMenuSubTrigger = React.forwardRef<
45
42
< DropdownMenuPrimitive . SubTrigger
46
43
ref = { ref }
47
44
className = { cn (
48
- "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent" ,
45
+ "flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 " ,
49
46
inset && "pl-8" ,
50
47
className
51
48
) }
52
49
{ ...props }
53
50
>
54
51
{ children }
55
- < ChevronRightIcon className = "ml-auto h-4 w-4 " />
52
+ < ChevronRight className = "ml-auto" />
56
53
</ DropdownMenuPrimitive . SubTrigger >
57
54
) )
58
55
DropdownMenuSubTrigger . displayName =
@@ -78,7 +75,7 @@ const DropdownMenuContent = React.forwardRef<
78
75
React . ElementRef < typeof DropdownMenuPrimitive . Content > ,
79
76
React . ComponentPropsWithoutRef < typeof DropdownMenuPrimitive . Content >
80
77
> ( ( { className, sideOffset = 4 , ...props } , ref ) => (
81
-
78
+ < DropdownMenuPrimitive . Portal >
82
79
< DropdownMenuPrimitive . Content
83
80
ref = { ref }
84
81
sideOffset = { sideOffset }
@@ -89,7 +86,7 @@ const DropdownMenuContent = React.forwardRef<
89
86
) }
90
87
{ ...props }
91
88
/>
92
-
89
+ </ DropdownMenuPrimitive . Portal >
93
90
) )
94
91
DropdownMenuContent . displayName = DropdownMenuPrimitive . Content . displayName
95
92
@@ -102,7 +99,7 @@ const DropdownMenuItem = React.forwardRef<
102
99
< DropdownMenuPrimitive . Item
103
100
ref = { ref }
104
101
className = { cn (
105
- "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50" ,
102
+ "relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0 " ,
106
103
inset && "pl-8" ,
107
104
className
108
105
) }
@@ -126,7 +123,7 @@ const DropdownMenuCheckboxItem = React.forwardRef<
126
123
>
127
124
< span className = "absolute left-2 flex h-3.5 w-3.5 items-center justify-center" >
128
125
< DropdownMenuPrimitive . ItemIndicator >
129
- < CheckIcon className = "h-4 w-4" />
126
+ < Check className = "h-4 w-4" />
130
127
</ DropdownMenuPrimitive . ItemIndicator >
131
128
</ span >
132
129
{ children }
@@ -149,7 +146,7 @@ const DropdownMenuRadioItem = React.forwardRef<
149
146
>
150
147
< span className = "absolute left-2 flex h-3.5 w-3.5 items-center justify-center" >
151
148
< DropdownMenuPrimitive . ItemIndicator >
152
- < DotFilledIcon className = "h-4 w-4 fill-current" />
149
+ < Circle className = "h-2 w-2 fill-current" />
153
150
</ DropdownMenuPrimitive . ItemIndicator >
154
151
</ span >
155
152
{ children }
0 commit comments