blockly > Theme > (constructor)

Theme.(constructor)

Constructs a new instance of the Theme class

Signature:

constructor(name: string, opt_blockStyles?: {
        [key: string]: Partial<BlockStyle>;
    }, opt_categoryStyles?: {
        [key: string]: CategoryStyle;
    }, opt_componentStyles?: ComponentStyle);

Parameters

Parameter Type Description
name string Theme name.
opt_blockStyles { [key: string]: Partial<BlockStyle>; } (Optional) A map from style names (strings) to objects with style attributes for blocks.
opt_categoryStyles { [key: string]: CategoryStyle; } (Optional) A map from style names (strings) to objects with style attributes for categories.
opt_componentStyles ComponentStyle (Optional) A map of Blockly component names to style value.