Added export popup (only UI)

This commit is contained in:
l_samenv
2024-08-23 15:29:14 +02:00
parent 9e012ac740
commit 07946fc851
7 changed files with 360 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
.action-entry{
height: 28px;
display: flex;
margin-left: 10px;
margin-right: 10px;
}
.action-entry-title{
text-align: center;
vertical-align: middle;
line-height: 28px;
}
.action-entry-arrow{
width: 18px;
height: 18px;
margin-left: auto;
margin-top: auto;
margin-bottom: auto;
cursor: pointer;
}

View File

@@ -0,0 +1,28 @@
class ActionEntry extends HTMLElement{
constructor(title, actionCallback){
super();
this.title = title;
this.actionCallback = actionCallback;
}
performActionCallback(){
this.actionCallback()
}
connectedCallback(){
this.render();
this.getElementsByTagName("img")[0].onclick = () => {this.performActionCallback();};
}
render(){
this.innerHTML = `
<link rel="stylesheet" href="components/action_entry/action_entry.css">
<div class="action-entry">
<span class="action-entry-title">${this.title}</span>
<img src="res/arrow.png" class="action-entry-arrow">
</div>
`;
}
}
customElements.define("sea-action-entry", ActionEntry);