@@ -3,21 +3,21 @@ import ReactDOM from 'react-dom';
33
44export type MenuItem =
55 | {
6- label : string ;
7- action : ( ) => void ;
8- icon ?: React . FC < { className ?: string } > ;
9- disabled ?: boolean ;
10- shortcut ?: string ;
11- submenu ?: never ;
12- }
6+ label : string ;
7+ action : ( ) => void ;
8+ icon ?: React . FC < { className ?: string } > ;
9+ disabled ?: boolean ;
10+ shortcut ?: string ;
11+ submenu ?: never ;
12+ }
1313 | {
14- label : string ;
15- submenu : MenuItem [ ] ;
16- icon ?: React . FC < { className ?: string } > ;
17- disabled ?: boolean ;
18- shortcut ?: string ;
19- action ?: never ;
20- }
14+ label : string ;
15+ submenu : MenuItem [ ] ;
16+ icon ?: React . FC < { className ?: string } > ;
17+ disabled ?: boolean ;
18+ shortcut ?: string ;
19+ action ?: never ;
20+ }
2121 | { type : 'separator' } ;
2222
2323interface ContextMenuProps {
@@ -96,9 +96,9 @@ const ContextMenu: React.FC<ContextMenuProps> = ({ isOpen, position, items, onCl
9696 }
9797 } ;
9898 const handleKeyDown = ( event : KeyboardEvent ) => {
99- if ( event . key === 'Escape' ) {
100- onClose ( ) ;
101- }
99+ if ( event . key === 'Escape' ) {
100+ onClose ( ) ;
101+ }
102102 }
103103
104104 document . addEventListener ( 'mousedown' , handleClickOutside ) ;
@@ -200,7 +200,7 @@ const ContextMenu: React.FC<ContextMenuProps> = ({ isOpen, position, items, onCl
200200 }
201201 } }
202202 disabled = { item . disabled || ! hasEnabledSubitem }
203- className = "w-full flex items-center justify-between text-left px-2 py-1 text-xs rounded-sm transition-colors text-text-main disabled:text-text-secondary/50 disabled:cursor-not-allowed hover:bg-tree-selected hover:text-text-main focus:bg-tree-selected focus:text-text-main focus:outline-none"
203+ className = "w-full flex items-center justify-between text-left px-2 py-1.5 text-xs rounded-md transition-colors text-text-main disabled:text-text-secondary/50 disabled:cursor-not-allowed hover:bg-primary hover:text-primary-text focus:bg-primary focus:text-primary-text focus:outline-none"
204204 >
205205 < div className = "flex items-center gap-3" >
206206 { Icon && < Icon className = "w-4 h-4" /> }
@@ -209,7 +209,7 @@ const ContextMenu: React.FC<ContextMenuProps> = ({ isOpen, position, items, onCl
209209 < span className = "text-text-secondary" > ›</ span >
210210 </ button >
211211 { isOpen && item . submenu . length > 0 && (
212- < div className = "absolute top-0 left-full ml-1 z-10 w-[16.8rem] rounded-sm bg-secondary p-1 border border-border-color animate-fade-in-fast" >
212+ < div className = "absolute top-0 left-full ml-1 z-10 w-[16.8rem] rounded-md bg-secondary p-1.5 shadow-2xl border border-border-color animate-fade-in-fast" >
213213 < ul className = "space-y-1" > { renderItems ( item . submenu , depth + 1 ) } </ ul >
214214 </ div >
215215 ) }
@@ -229,7 +229,7 @@ const ContextMenu: React.FC<ContextMenuProps> = ({ isOpen, position, items, onCl
229229 }
230230 } }
231231 disabled = { disabled }
232- className = "w-full flex items-center justify-between text-left px-2 py-1 text-xs rounded-sm transition-colors text-text-main disabled:text-text-secondary/50 disabled:cursor-not-allowed hover:bg-tree-selected hover:text-text-main focus:bg-tree-selected focus:text-text-main focus:outline-none"
232+ className = "w-full flex items-center justify-between text-left px-2 py-1.5 text-xs rounded-md transition-colors text-text-main disabled:text-text-secondary/50 disabled:cursor-not-allowed hover:bg-primary hover:text-primary-text focus:bg-primary focus:text-primary-text focus:outline-none"
233233 >
234234 < div className = "flex items-center gap-3" >
235235 { Icon && < Icon className = "w-4 h-4" /> }
@@ -251,7 +251,7 @@ const ContextMenu: React.FC<ContextMenuProps> = ({ isOpen, position, items, onCl
251251 maxHeight : menuStyle . maxHeight ? menuStyle . maxHeight : undefined ,
252252 overflowY : menuStyle . overflowY ,
253253 } }
254- className = "fixed z-50 w-[16.8rem] rounded-sm bg-secondary p-1 border border-border-color animate-fade-in-fast"
254+ className = "fixed z-50 w-[16.8rem] rounded-md bg-secondary p-1.5 shadow-2xl border border-border-color animate-fade-in-fast"
255255 >
256256 < ul className = "space-y-1" >
257257 { renderItems ( items ) }
0 commit comments