aboutsummaryrefslogtreecommitdiff
path: root/src/lib/button.ts
blob: 794df35effead25dd185181552b3e1812d31dd23 (plain)
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
import { h, Children, concatClassName } from 'lib/h'

export function raw(attrs: object, ...children: Children): Element {
  return h('button',
    concatClassName(attrs, 'g-Button__Raw'),
    ...children
  )
}

export function text(attrs: object, ...children: Children): Element {
  return h('button',
    concatClassName(attrs, 'g-Button__Text'),
    ...children
  )
}

export function action(attrs: object, ...children: Children): Element {
  return h('button',
    concatClassName(attrs, 'g-Button__Action'),
    ...children
  )
}

export function cancel(attrs: object, ...children: Children): Element {
  return h('button',
    concatClassName(attrs, 'g-Button__Cancel'),
    ...children
  )
}