Add basic list menu elements and fix alwaysToggle to only trigger if the popup is open.

This commit is contained in:
2024-05-21 12:31:25 +02:00
parent 7420945748
commit a548ed8591
5 changed files with 248 additions and 4 deletions

35
tp-popup-menu.js Normal file
View File

@ -0,0 +1,35 @@
/**
@license
Copyright (c) 2024 trading_peter
This program is available under Apache License Version 2.0
*/
import { LitElement, html, css } from 'lit';
class TpPopupMenu extends LitElement {
static get styles() {
return [
css`
:host {
display: block;
}
.wrap {
min-width: 120px;
padding: 6px 0;
border-radius: 2px;
}
`
];
}
render() {
return html`
<div class="wrap">
<slot></slot>
</div>
`;
}
}
window.customElements.define('tp-popup-menu', TpPopupMenu);