enb / enb-bemxjst

bem-xjst support for ENB

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sugar for not installed modifiers

belozer opened this issue · comments

block('menu')(
    content()('title'),
    
    match((node) => !node.mods.lazy)(
        content()(() => [
            applyNext(),
            'without lazy'
        ])
    ),
    
    // Sugar
    mod('lazy', false)(
        content()(() => [
            applyNext(),
            'sugar without lazy'
        ])
    )
);

block('menu').mod('lazy')(
    content()((node, ctx) => [
        applyNext(),
        {
            block : 'spiner'
        }
    ])    
);