summaryrefslogtreecommitdiffstats
path: root/tpl/objects/checkbox.pug
blob: db794f6e22d83da3d7efd5fe41709bfed62e1517 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
include icon.pug

mixin checkbox
    -
        let classes = {
            'o-checkbox':         true,
            'o-checkbox--accent': attributes.accent,
        }

    label(class=classes)
        input.o-checkbox__native(
            type='checkbox'
            class={ 'is-indeterminate': attributes.indeterminate }
        )&attributes(attributes)
        span.o-checkbox__box
            +icon('check')(class='o-checkbox__check-icon')
        span.o-checkbox__label
            block