summaryrefslogtreecommitdiffstats
path: root/tpl/objects/table.pug
blob: e635589c2f2a4474985d055dcbd542944bbd3b0d (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--50':          attributes.size50,
        }

    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