summaryrefslogtreecommitdiffstats
path: root/tpl/objects/action-menu.pug
blob: be9d86d8ae061874cc14fe85b7bfde3fdb564876 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
include icon.pug
include status-indicator.pug

mixin action-menu
    .o-action-menu.u-p-static.t-up
        block

mixin action-menu-item
    button.o-action-menu__item(disabled=attributes.disabled)
        .l-media.l-media--flush
            .l-media__block.o-action-menu__icon-slot
                if attributes.icon
                    if attributes.iconIsStatus
                        +status-indicator(attributes.icon)(class='o-action-menu__icon')
                    else
                        +icon(attributes.icon)(class='o-action-menu__icon')
            .l-media__block.l-media__block--main
                block
            .l-media__block.o-action-menu__icon-slot
                if attributes.postIcon
                    +icon(attributes.postIcon)(class='o-action-menu__icon')

mixin action-menu-separator
    .o-action-menu__separator

mixin action-menu-slot
    -
        let classes = {
            'o-action-menu__slot ': true,
        }
        if (attributes.class) {
            classes[attributes.class] = true;
        }
    div(class=classes)
        block