Add the menu divider
This commit is contained in:
parent
58885dea0d
commit
5138a5c279
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@tp/tp-popup",
|
"name": "@tp/tp-popup",
|
||||||
"version": "1.0.8",
|
"version": "1.1.0",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "tp-popup.js",
|
"main": "tp-popup.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
38
tp-popup-menu-divider.js
Normal file
38
tp-popup-menu-divider.js
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
/**
|
||||||
|
@license
|
||||||
|
Copyright (c) 2025 trading_peter
|
||||||
|
This program is available under Apache License Version 2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
import '@tp/tp-icon/tp-icon.js';
|
||||||
|
import { LitElement, html, css } from 'lit';
|
||||||
|
|
||||||
|
class TpPopupMenuDivider extends LitElement {
|
||||||
|
static get styles() {
|
||||||
|
return [
|
||||||
|
css`
|
||||||
|
:host {
|
||||||
|
display: block;
|
||||||
|
--tp-popup-menu-divider-spacing: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.divider {
|
||||||
|
margin-top: var(--tp-popup-menu-divider-spacing-top, var(--tp-popup-menu-divider-spacing));
|
||||||
|
margin-bottom: var(--tp-popup-menu-divider-spacing-bottom, var(--tp-popup-menu-divider-spacing));
|
||||||
|
height: var(--tp-popup-menu-divider-width, 2px);
|
||||||
|
background: var(--tp-popup-menu-divider-color, #000);
|
||||||
|
}
|
||||||
|
`
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { icon } = this;
|
||||||
|
|
||||||
|
return html`
|
||||||
|
<div class="divider"></div>
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
window.customElements.define('tp-popup-menu-divider', TpPopupMenuDivider);
|
Loading…
x
Reference in New Issue
Block a user