summaryrefslogtreecommitdiffstats
path: root/tpl/objects/table.pug
blob: c8ff17e1f70e631b21efb03cffd3ff157a58297f (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
31
32
33
34
35
36
37
38
mixin table
    -
        let classes = {
            'o-table':              true,
            'o-table--flush':       attributes.flush,
            'o-table--box':         attributes.box,
            'o-table--interactive': attributes.interactive,
            'o-table--sm':          attributes.sm,
        }

    table(class=classes)
        block

mixin table-head
    thead.o-table__head
        block

mixin table-head-cell
    th.o-table__head-cell
        block

mixin table-body
    tbody.o-table__body
        block

mixin table-row
    tr.o-table__row
        block

mixin table-cell
    -
        let classes = {
            'o-table__cell':          true,
            'o-table__cell--divider': attributes.divider,
        }

    td(class=classes)
        block