@samatawy/diagrams
    Preparing search index...

    Interface ToolButtonDef

    Definition of a toolbar button. Provide only the properties you want to customize. All other properties will use default values.

    interface ToolButtonDef {
        id: string;
        icon?: string | Element;
        label?: string;
        tooltip?: string;
        toggle?: boolean;
        disabled?: boolean;
        onClick: (event: MouseEvent) => void | Promise<void>;
    }
    Index

    Properties

    id: string

    Unique identifier for the button. This is used to reference the button in the toolbar.

    icon?: string | Element

    SVG use href (e.g. '#icon-undo'), URL string, or an Element

    label?: string

    Optional label for the button. This is used for accessibility and tooltips.

    tooltip?: string

    Optional tooltip text for the button. This is displayed on hover.

    toggle?: boolean

    Indicates if the button is a toggle button.

    disabled?: boolean

    Indicates if the button is disabled.

    onClick: (event: MouseEvent) => void | Promise<void>

    Click event handler for the button.