diff options
Diffstat (limited to 'src/View/Modal.ml')
-rw-r--r-- | src/View/Modal.ml | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/src/View/Modal.ml b/src/View/Modal.ml deleted file mode 100644 index 9365555..0000000 --- a/src/View/Modal.ml +++ /dev/null @@ -1,27 +0,0 @@ -let hide () = - let body = Document.querySelectorUnsafe "body" in - let modal = Document.querySelectorUnsafe ".g-Modal" in - Element.removeChild body modal - -let show content = - let body = Document.querySelectorUnsafe "body" in - let view = - H.div - [| HA.class_ "g-Modal" |] - [| H.div - [| HA.class_ "g-Modal__Curtain" - ; HE.on_click (fun _ -> hide ()) - |] - [| |] - ; H.div - [| HA.class_ "g-Modal__Window" |] - [| H.button - [| HA.class_ "g-Modal__Close" - ; HE.on_click (fun _ -> hide ()) - |] - [| H.text "X" |] - ; content - |] - |] - in - Element.appendChild body view |