summaryrefslogtreecommitdiffstats
path: root/tpl/objects/overflow-button.pug
blob: f52f12bd7ea3b191e9bda06154fe7fbefd90e450 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
include icon.pug

mixin overflow-button
    -
        let classes = {
            'o-overflow-button': true,
            'u-d-block':         attributes.block,
            'is-selected':       attributes.selected
        }
        if (attributes.class) {
            classes[attributes.class] = true;
        }

        let href = attributes.disabled ? null : '#';

    a(class=classes href=href)
        .o-overflow-button__inside
            if attributes.icon
                +icon(attributes.icon)(block=!block)
                = ' '
        .o-overflow-button__outside
            block