blockly > Extensions > buildTooltipForDropdown

Extensions.buildTooltipForDropdown() function

Builds an extension function that will map a dropdown value to a tooltip string.


export declare function buildTooltipForDropdown(dropdownName: string, lookupTable: {
    [key: string]: string;
}): (this: Block) => void;


Parameter Type Description
dropdownName string The name of the field whose value is the key to the lookup table.
lookupTable { [key: string]: string; } The table of field values to tooltip text.


(this: Block) => void

The extension function.