|
@@ -0,0 +1,24 @@
|
|
|
+import { Overlay } from '../overlay/Overlay.jsx';
|
|
|
+import style from './dialog.css';
|
|
|
+
|
|
|
+function Dialog ({}, children) {
|
|
|
+ return function (state, actions) {
|
|
|
+ if (!state.dialog.isOpen) {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ return (
|
|
|
+ <Overlay>
|
|
|
+ <button className={style.close} onclick={actions.dialog.close} />
|
|
|
+
|
|
|
+ <div className={style.content}>
|
|
|
+ {children}
|
|
|
+ </div>
|
|
|
+ </Overlay>
|
|
|
+ );
|
|
|
+ };
|
|
|
+}
|
|
|
+
|
|
|
+export {
|
|
|
+ Dialog
|
|
|
+};
|