summaryrefslogtreecommitdiffstats
path: root/tpl/objects/action-menu.pug
blob: 0f690ce8a1730d60438b3419a2f12990a61fef31 (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
include action-button.pug
include icon.pug
include status-indicator.pug

mixin action-menu
    -
        let classes = {
            'o-action-menu':         true,
            'o-action-menu--static': true,
            't-raised':              true
        }

    div(class=classes)
        block

mixin action-menu-item
    button.o-action-menu__item.o-action-menu__item--native(disabled=attributes.disabled)
        .l-card.l-card--flush
            .l-card__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-card__block.l-card__block--main
                block
            .l-card__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