pivotick - v0.0.1
    Preparing search index...

    Type Alias MenuActionItemOptions<TThis>

    Options to define an action item in a menu. Can be used in contextual menus or multi-select menus.

    type MenuActionItemOptions<TThis extends UIElement = UIElement> = {
        iconClass?: IconClass;
        iconUnicode?: IconUnicode;
        imagePath?: ImagePath;
        onclick: (
            this: TThis,
            evt: PointerEvent | MouseEvent,
            element?: Node | Node[] | Edge | Edge[] | null,
        ) => void;
        svgIcon?: SVGIcon;
        text: string;
        title?: string;
        variant?: UIVariant;
        visible?: boolean | ((element: Node | Edge | null) => boolean);
    }

    Type Parameters

    Index

    Properties

    iconClass?: IconClass
    iconUnicode?: IconUnicode

    Unicode character for the icon (optional)

    imagePath?: ImagePath
    onclick: (
        this: TThis,
        evt: PointerEvent | MouseEvent,
        element?: Node | Node[] | Edge | Edge[] | null,
    ) => void
    svgIcon?: SVGIcon
    text: string

    Text of the option.

    title?: string

    Title to be shown when hovering over the option.

    variant?: UIVariant
    outline-primary
    
    visible?: boolean | ((element: Node | Edge | null) => boolean)