summaryrefslogtreecommitdiffstats
path: root/tpl/objects/button.pug
blob: 8cae2f1454edadc115a52a9f5d2a728655bb72d6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
mixin a-button
    -
        let classes = {
            'o-button':          true,
            'o-button--block':   attributes.block,
            'o-button--outline': attributes.outline
        }
        if (attributes.variant) {
            classes['o-button--' + attributes.variant] = true
        }

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

    a(class=classes href=href aria-disabled=attributes.disabled && String(attributes.disabled))
        block