File tree Expand file tree Collapse file tree 2 files changed +27
-26
lines changed
Expand file tree Collapse file tree 2 files changed +27
-26
lines changed Original file line number Diff line number Diff line change 6565 "lint-staged" : " 16.1.5" ,
6666 "postcss" : " 8.5.6" ,
6767 "postcss-import" : " 16.1.1" ,
68- "postcss-js" : " 4.0.1" ,
6968 "prettier" : " 3.6.2" ,
7069 "simple-git-hooks" : " 2.13.1" ,
7170 "tailwind-scrollbar" : " 4.0.2" ,
9089 " eslint --fix"
9190 ]
9291 }
93- }
92+ }
Original file line number Diff line number Diff line change @@ -90,31 +90,33 @@ const ContextMenuContent = ({
9090)
9191ContextMenuContent . displayName = ContextMenuPrimitive . Content . displayName
9292
93- const ContextMenuItem = ( {
94- ref,
95- className,
96- inset,
97- hasIcon,
98- ...props
99- } : React . ComponentPropsWithoutRef < typeof ContextMenuPrimitive . Item > & {
100- inset ?: boolean
101- hasIcon ?: boolean
102- } & {
103- ref ?: React . Ref < React . ElementRef < typeof ContextMenuPrimitive . Item > | null >
104- } ) => (
105- < ContextMenuPrimitive . Item
106- ref = { ref }
107- className = { clsxm (
108- 'cursor-menu focus:bg-accent focus:text-white text-sm text-foreground relative flex select-none items-center rounded-[5px] px-2.5 py-1 outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50' ,
109- 'data-[highlighted]:bg-accent data-[highlighted]:text-white focus-within:outline-transparent' ,
110- 'h-[28px]' ,
111- inset && 'pl-8' ,
112- hasIcon ? 'px-8' : 'pr-8' ,
93+ const ContextMenuItem = React . memo (
94+ ( {
95+ ref,
96+ className,
97+ inset,
98+ hasIcon,
99+ ...props
100+ } : React . ComponentPropsWithoutRef < typeof ContextMenuPrimitive . Item > & {
101+ inset ?: boolean
102+ hasIcon ?: boolean
103+ } & {
104+ ref ?: React . Ref < React . ElementRef < typeof ContextMenuPrimitive . Item > | null >
105+ } ) => (
106+ < ContextMenuPrimitive . Item
107+ ref = { ref }
108+ className = { clsxm (
109+ 'cursor-menu focus:bg-accent focus:text-white text-sm text-foreground relative flex select-none items-center rounded-[5px] px-2.5 py-1 outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50' ,
110+ 'data-[highlighted]:bg-accent data-[highlighted]:text-white focus-within:outline-transparent' ,
111+ 'h-[28px]' ,
112+ inset && 'pl-8' ,
113+ hasIcon ? 'px-8' : 'pr-8' ,
113114
114- className ,
115- ) }
116- { ...props }
117- />
115+ className ,
116+ ) }
117+ { ...props }
118+ />
119+ ) ,
118120)
119121ContextMenuItem . displayName = ContextMenuPrimitive . Item . displayName
120122
You can’t perform that action at this time.
0 commit comments