summaryrefslogtreecommitdiffstats
path: root/tpl/objects/checkbox.pug
blob: 874505b619ebacfe0f07842560ecb15e5dc3c370 (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)
        .o-checkbox__box
            +icon('check')(class='o-checkbox__check-icon')
        .o-checkbox__label
            block