Add basic list menu elements and fix alwaysToggle to only trigger if the popup is open.
This commit is contained in:
35
tp-popup-menu.js
Normal file
35
tp-popup-menu.js
Normal 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);
|
Reference in New Issue
Block a user