Added export popup (only UI)
This commit is contained in:
21
client/components/action_entry/action_entry.css
Normal file
21
client/components/action_entry/action_entry.css
Normal 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;
|
||||
}
|
||||
28
client/components/action_entry/action_entry.js
Normal file
28
client/components/action_entry/action_entry.js
Normal 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);
|
||||
Reference in New Issue
Block a user