mirror of
https://github.com/zadam/trilium.git
synced 2025-10-31 18:36:30 +01:00
style/global menu: improve the full screen / zoom buttons, refactor
This commit is contained in:
@@ -84,6 +84,7 @@ interface FormListItemOpts {
|
||||
disabled?: boolean;
|
||||
checked?: boolean | null;
|
||||
selected?: boolean;
|
||||
container?: boolean;
|
||||
onClick?: (e: MouseEvent) => void;
|
||||
triggerCommand?: CommandNames;
|
||||
description?: string;
|
||||
@@ -96,7 +97,7 @@ const TOOLTIP_CONFIG: Partial<Tooltip.Options> = {
|
||||
fallbackPlacements: [ "right" ]
|
||||
}
|
||||
|
||||
export function FormListItem({ className, icon, value, title, active, disabled, checked, onClick, selected, rtl, triggerCommand, description, ...contentProps }: FormListItemOpts) {
|
||||
export function FormListItem({ className, icon, value, title, active, disabled, checked, container, onClick, selected, rtl, triggerCommand, description, ...contentProps }: FormListItemOpts) {
|
||||
const itemRef = useRef<HTMLLIElement>(null);
|
||||
|
||||
if (checked) {
|
||||
@@ -108,9 +109,9 @@ export function FormListItem({ className, icon, value, title, active, disabled,
|
||||
return (
|
||||
<li
|
||||
ref={itemRef}
|
||||
class={`dropdown-item ${active ? "active" : ""} ${disabled ? "disabled" : ""} ${selected ? "selected" : ""} ${className ?? ""}`}
|
||||
class={`dropdown-item ${active ? "active" : ""} ${disabled ? "disabled" : ""} ${selected ? "selected" : ""} ${container ? "dropdown-container-item": ""} ${className ?? ""}`}
|
||||
data-value={value} title={title}
|
||||
tabIndex={0}
|
||||
tabIndex={container ? -1 : 0}
|
||||
onClick={onClick}
|
||||
data-trigger-command={triggerCommand}
|
||||
dir={rtl ? "rtl" : undefined}
|
||||
|
||||
Reference in New Issue
Block a user