Skip to main content

Home > 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

ParameterTypeDescription
namestringTheme 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_componentStylesComponentStyle(Optional) A map of Blockly component names to style value.