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

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

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

mixin navbar-item
    -
        let classes = {
            'o-navbar__item': true,
            'is-selected':    attributes.selected,
        }
        if (attributes.class) {
            classes[attributes.class] = true;
        }

    #{!!attributes.tag ? attributes.tag : 'button'}(class=classes)&attributes(attributes)
        .o-navbar__item-label
            block