aboutsummaryrefslogtreecommitdiff
path: root/src/lib/modal.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/modal.ts')
-rw-r--r--src/lib/modal.ts28
1 files changed, 0 insertions, 28 deletions
diff --git a/src/lib/modal.ts b/src/lib/modal.ts
deleted file mode 100644
index 8454e1c..0000000
--- a/src/lib/modal.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-import { h } from 'lib/h'
-import * as Button from 'lib/button'
-
-export function show(content: Element) {
- document.body.appendChild(h('div',
- { id: 'g-Modal' },
- h('div',
- { className: 'g-Modal__Curtain',
- onclick: () => hide()
- }
- ),
- h('div',
- { className: 'g-Modal__Window' },
- Button.raw(
- { className: 'g-Modal__Close',
- onclick: () => hide()
- },
- 'x'
- ),
- content
- )
- ))
-}
-
-export function hide() {
- const modal = document.querySelector('#g-Modal')
- modal && document.body.removeChild(modal)
-}