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

mixin icon-nav
    -
        let classes = {
            'o-icon-nav':           true,
            'o-icon-nav--vertical': attributes.vertical,
        }
        if (attributes.class) {
            classes[attributes.class] = true;
        }

    div(class=classes)&attributes(attributes)
        block

mixin icon-nav-item(icon)
    -
        let classes = {
            'o-icon-nav__item': true,
            'o-action-button': true,
            'o-action-button--round': true,
            'o-action-button--quiet': true,
            'is-selected':  attributes.selected,
        }
        if (attributes.class) {
            classes[attributes.class] = true;
        }

    button(class=classes)&attributes(attributes)
        +icon(icon)(block=true)