diff --git a/src/components/app-base.js b/src/components/app-base.js
index 42cc92d..cd8a051 100644
--- a/src/components/app-base.js
+++ b/src/components/app-base.js
@@ -32,18 +32,6 @@ class AppBase extends HTMLElement {
* {
margin: 0;
}
- #window {
- width: 800px;
- height: 477px;
- background: #FFFFFF 0% 0% no-repeat padding-box;
- box-shadow: 0px 5px 12px #0000001F;
- border-radius: 20px;
- opacity: 1;
- padding: 50px;
- display: flex;
- flex-direction: column;
- row-gap: 35px;
- }
#title {
height: 49px;;
margin-bottom: -12px;
@@ -94,7 +82,7 @@ class AppBase extends HTMLElement {
margin-top: 3px;
}
-
-
${title}
-
${description}
+
`;
diff --git a/src/components/modal.js b/src/components/modal.js
new file mode 100644
index 0000000..231a881
--- /dev/null
+++ b/src/components/modal.js
@@ -0,0 +1,57 @@
+import Store from '../modules/store.js';
+
+class CustomModal extends HTMLElement {
+ static observedAttributes = ['active', 'color', 'action'];
+
+ constructor() {
+ super();
+ this.publish = Store.publish;
+ this.attachShadow({ mode: 'open' });
+ }
+
+ onClick(e) {
+ this.publish(this.getAttribute('action'));
+ }
+
+ connectedCallback() {
+ this.render();
+ this.shadowRoot.getElementById('button').addEventListener('click', this.onClick.bind(this));
+ }
+
+ disconnectedCallback() {
+ this.shadowRoot.getElementById('button').removeEventListener('click', this.onClick);
+ }
+
+ attributeChangedCallback() {
+ this.render();
+ }
+
+ render() {
+ this.shadowRoot.innerHTML = `
+
+
+
+
+ `;
+ }
+}
+
+customElements.define('custom-modal', CustomModal);
diff --git a/src/main.js b/src/main.js
index 9dfe32e..165c288 100644
--- a/src/main.js
+++ b/src/main.js
@@ -1,4 +1,6 @@
import './components/app-base.js';
+import './main-window.js';
import './components/custom-button.js';
import './components/item-list.js';
+import './components/custom-modal.js';