Table of contents

Menu Config

Menu configuration format. Is used for defining Block Tunes Menu items via Block Tool's renderSettings() and Block Tune's render(). Can be represented as a single item or an array of items of the following structure:

icon Optional String with tune's icon svg
label Optional Tune label text
onActivate Optional Function to be called once tune activated by the user
Optional True if tune should be marked as active
isDisabled Optional True if tune should be disabled
closeOnActivate Optional True if Block Tunes menu should close once the tune is activated. By default, the menu will stay visible after the tune activation
toggle Optional True if tune should act like a toggle (become highlighted on activation)

Alternatively, can be set to toggle group name, which will make the tune behave like radio button. See example
confirmation Optional Allows to ask for user confirmation before tune activation. Contains settings of the item to be displayed at the place of clicked item. If confirmation setting is set on the tune, it should not contain onActivate callback.