summaryrefslogtreecommitdiffstats
path: root/tpl/objects/action-button.pug
blob: 0afe1eaa8e801b358f21f41a6580d7da639fb84a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
include icon.pug

mixin action-button
  -
    let classes = {
      'o-action-button':        true,
      'o-action-button--block': attributes.block,
      'o-action-button--quiet': attributes.quiet,
      'is-disabled':            attributes.disabled,
      'is-selected':            attributes.selected
    }
    
    let href = attributes.disabled ? null : '#';

  a(class=classes href=href)
    if attributes.icon
      +icon(attributes.icon)
      = ' '
    if block
      span.o-action-button__label
        block