aboutsummaryrefslogtreecommitdiff
path: root/src/View/Button.ml
diff options
context:
space:
mode:
authorJoris2020-08-08 12:49:03 +0200
committerJoris2020-08-08 12:49:03 +0200
commit081e6aae57719c15bdbc5e973ca7ddba9506a4bb (patch)
treea8de15bb4165639cf283bde7b7e63eb330e83d88 /src/View/Button.ml
parent4ee0dfae75fda3a8b6347d55c728b50ce5c210d9 (diff)
downloadmap-081e6aae57719c15bdbc5e973ca7ddba9506a4bb.tar.gz
map-081e6aae57719c15bdbc5e973ca7ddba9506a4bb.tar.bz2
map-081e6aae57719c15bdbc5e973ca7ddba9506a4bb.zip
Show context menu to add, modify and delete markers
Diffstat (limited to 'src/View/Button.ml')
-rw-r--r--src/View/Button.ml18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/View/Button.ml b/src/View/Button.ml
index 31fa1b0..c325fdd 100644
--- a/src/View/Button.ml
+++ b/src/View/Button.ml
@@ -1,13 +1,9 @@
-let action on_click label =
+let action attrs content =
H.button
- [| HA.class_ "g-Button__Action"
- ; HE.on_click on_click
- |]
- [| H.text label |]
+ (Js.Array.concat attrs [| HA.class_ "g-Button__Action" |])
+ content
-let danger on_click label =
- H.button
- [| HA.class_ "g-Button__Danger"
- ; HE.on_click on_click
- |]
- [| H.text label |]
+let cancel attrs content =
+ H.button
+ (Js.Array.concat attrs [| HA.class_ "g-Button__Cancel" |])
+ content