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
@@ -31,14 +27,14 @@ const DropdownMenuSubTrigger = React.forwardRef<
31
27
< DropdownMenuPrimitive . SubTrigger
32
28
ref = { ref }
33
29
className = { cn (
34
- "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" ,
30
+ "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 " ,
35
31
inset && "pl-8" ,
36
32
className
37
33
) }
38
34
{ ...props }
39
35
>
40
36
{ children }
41
- < ChevronRightIcon className = "ml-auto h-4 w-4 " />
37
+ < ChevronRight className = "ml-auto" />
42
38
</ DropdownMenuPrimitive . SubTrigger >
43
39
) )
44
40
DropdownMenuSubTrigger . displayName =
@@ -64,7 +60,7 @@ const DropdownMenuContent = React.forwardRef<
64
60
React . ElementRef < typeof DropdownMenuPrimitive . Content > ,
65
61
React . ComponentPropsWithoutRef < typeof DropdownMenuPrimitive . Content >
66
62
> ( ( { className, sideOffset = 4 , ...props } , ref ) => (
67
-
63
+ < DropdownMenuPrimitive . Portal >
68
64
< DropdownMenuPrimitive . Content
69
65
ref = { ref }
70
66
sideOffset = { sideOffset }
@@ -75,7 +71,7 @@ const DropdownMenuContent = React.forwardRef<
75
71
) }
76
72
{ ...props }
77
73
/>
78
-
74
+ </ DropdownMenuPrimitive . Portal >
79
75
) )
80
76
DropdownMenuContent . displayName = DropdownMenuPrimitive . Content . displayName
81
77
@@ -88,7 +84,7 @@ const DropdownMenuItem = React.forwardRef<
88
84
< DropdownMenuPrimitive . Item
89
85
ref = { ref }
90
86
className = { cn (
91
- "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" ,
87
+ "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 " ,
92
88
inset && "pl-8" ,
93
89
className
94
90
) }
@@ -112,7 +108,7 @@ const DropdownMenuCheckboxItem = React.forwardRef<
112
108
>
113
109
< span className = "absolute left-2 flex h-3.5 w-3.5 items-center justify-center" >
114
110
< DropdownMenuPrimitive . ItemIndicator >
115
- < CheckIcon className = "h-4 w-4" />
111
+ < Check className = "h-4 w-4" />
116
112
</ DropdownMenuPrimitive . ItemIndicator >
117
113
</ span >
118
114
{ children }
@@ -135,7 +131,7 @@ const DropdownMenuRadioItem = React.forwardRef<
135
131
>
136
132
< span className = "absolute left-2 flex h-3.5 w-3.5 items-center justify-center" >
137
133
< DropdownMenuPrimitive . ItemIndicator >
138
- < DotFilledIcon className = "h-4 w-4 fill-current" />
134
+ < Circle className = "h-2 w-2 fill-current" />
139
135
</ DropdownMenuPrimitive . ItemIndicator >
140
136
</ span >
141
137
{ children }
0 commit comments