Skip to content

MenuItem.setWarning method

MenuItem › setWarning

Unofficial

Add warning styling to the menu item.

Signature:

setWarning(warning: boolean): this

Parameters:

Parameter Type Description
warning boolean Whether the menu item should be styled as a warning. If set to true the {@link obsidian#MenuItem}'s title and icon will become red. Or whatever color is applied to the class 'is-warning' by a theme.

Returns: thisThe menu item instance.

Since: 0.15.0