aboutsummaryrefslogtreecommitdiff
path: root/src/View/Button.ml
diff options
context:
space:
mode:
authorJoris2020-07-26 18:16:59 +0200
committerJoris2020-07-26 18:16:59 +0200
commit4ee0dfae75fda3a8b6347d55c728b50ce5c210d9 (patch)
tree5f73adaf57354e0070acaa9a6b60dc49c0c48526 /src/View/Button.ml
parent447f43995ae8d83c82d98d9d8968e90d6c4518e7 (diff)
Allow to customize icons
Diffstat (limited to 'src/View/Button.ml')
-rw-r--r--src/View/Button.ml13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/View/Button.ml b/src/View/Button.ml
new file mode 100644
index 0000000..31fa1b0
--- /dev/null
+++ b/src/View/Button.ml
@@ -0,0 +1,13 @@
+let action on_click label =
+ H.button
+ [| HA.class_ "g-Button__Action"
+ ; HE.on_click on_click
+ |]
+ [| H.text label |]
+
+let danger on_click label =
+ H.button
+ [| HA.class_ "g-Button__Danger"
+ ; HE.on_click on_click
+ |]
+ [| H.text label |]