mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 19:49:01 +01:00 
			
		
		
		
	fix(react/ribbon): note context menu button looking off
This commit is contained in:
		
							parent
							
								
									19c0305ed9
								
							
						
					
					
						commit
						1eaac79d63
					
				| @ -13,12 +13,14 @@ export interface DropdownProps { | |||||||
|     dropdownContainerStyle?: CSSProperties; |     dropdownContainerStyle?: CSSProperties; | ||||||
|     dropdownContainerClassName?: string; |     dropdownContainerClassName?: string; | ||||||
|     hideToggleArrow?: boolean; |     hideToggleArrow?: boolean; | ||||||
|  |     /** If set to true, then the dropdown button will be considered an icon action (without normal border and sized for icons only). */ | ||||||
|  |     iconAction?: boolean; | ||||||
|     noSelectButtonStyle?: boolean; |     noSelectButtonStyle?: boolean; | ||||||
|     disabled?: boolean; |     disabled?: boolean; | ||||||
|     text?: ComponentChildren; |     text?: ComponentChildren; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| export default function Dropdown({ className, buttonClassName, isStatic, children, title, text, dropdownContainerStyle, dropdownContainerClassName, hideToggleArrow, disabled, noSelectButtonStyle }: DropdownProps) { | export default function Dropdown({ className, buttonClassName, isStatic, children, title, text, dropdownContainerStyle, dropdownContainerClassName, hideToggleArrow, iconAction, disabled, noSelectButtonStyle }: DropdownProps) { | ||||||
|     const dropdownRef = useRef<HTMLDivElement | null>(null); |     const dropdownRef = useRef<HTMLDivElement | null>(null); | ||||||
|     const triggerRef = useRef<HTMLButtonElement | null>(null); |     const triggerRef = useRef<HTMLButtonElement | null>(null); | ||||||
| 
 | 
 | ||||||
| @ -58,7 +60,7 @@ export default function Dropdown({ className, buttonClassName, isStatic, childre | |||||||
|     return ( |     return ( | ||||||
|         <div ref={dropdownRef} class={`dropdown ${className ?? ""}`} style={{ display: "flex" }}> |         <div ref={dropdownRef} class={`dropdown ${className ?? ""}`} style={{ display: "flex" }}> | ||||||
|             <button |             <button | ||||||
|                 className={`btn ${!noSelectButtonStyle ? "select-button" : ""} ${buttonClassName ?? ""} ${!hideToggleArrow ? "dropdown-toggle" : ""}`} |                 className={`${iconAction ? "icon-action" : "btn"} ${!noSelectButtonStyle ? "select-button" : ""} ${buttonClassName ?? ""} ${!hideToggleArrow ? "dropdown-toggle" : ""}`} | ||||||
|                 ref={triggerRef} |                 ref={triggerRef} | ||||||
|                 type="button" |                 type="button" | ||||||
|                 data-bs-toggle="dropdown" |                 data-bs-toggle="dropdown" | ||||||
|  | |||||||
| @ -59,6 +59,7 @@ function NoteContextMenu({ note, noteContext }: { note: FNote, noteContext?: Not | |||||||
|       className="note-actions" |       className="note-actions" | ||||||
|       hideToggleArrow |       hideToggleArrow | ||||||
|       noSelectButtonStyle |       noSelectButtonStyle | ||||||
|  |       iconAction | ||||||
|     > |     > | ||||||
|       {canBeConvertedToAttachment && <ConvertToAttachment note={note} /> } |       {canBeConvertedToAttachment && <ConvertToAttachment note={note} /> } | ||||||
|       {note.type === "render" && <CommandItem command="renderActiveNote" icon="bx bx-extension" text={t("note_actions.re_render_note")} />} |       {note.type === "render" && <CommandItem command="renderActiveNote" icon="bx bx-extension" text={t("note_actions.re_render_note")} />} | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Elian Doran
						Elian Doran