Skip to content

Latest commit

 

History

History
24 lines (18 loc) · 547 Bytes

button_action_mod.en.md

File metadata and controls

24 lines (18 loc) · 547 Bytes

button_action_mod

Parent blocks's modifier switch (action modifier with mod value)

Use case: BEMJSON.

Use the action modifier with the mod value to create a button that switches the parent block's modifier on click. Specify parent target, modifier name and value via js params field.

Example

Button inside popup closes it on click:

{
    block : 'button',
    mods : { action : 'mod' },
    js : {
        target : 'popup',
        modName : 'visible',
        modVal : false
    },
    text : 'Close popup'
}