Make sure a noicon item assignes the full with to the label. Add part for the wrap.
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@tp/tp-popup",
|
"name": "@tp/tp-popup",
|
||||||
"version": "1.2.0",
|
"version": "1.3.0",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "tp-popup.js",
|
"main": "tp-popup.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/**
|
/**
|
||||||
@license
|
@license
|
||||||
Copyright (c) 2024 trading_peter
|
Copyright (c) 2026 trading_peter
|
||||||
This program is available under Apache License Version 2.0
|
This program is available under Apache License Version 2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -30,6 +30,10 @@ class TpPopupMenuItem extends LitElement {
|
|||||||
color: var(--tp-popup-menu-item-color, #000);
|
color: var(--tp-popup-menu-item-color, #000);
|
||||||
background: var(--tp-popup-menu-item-bg, transparent);
|
background: var(--tp-popup-menu-item-bg, transparent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.wrap[noicon] {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
}
|
||||||
`
|
`
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@@ -38,7 +42,7 @@ class TpPopupMenuItem extends LitElement {
|
|||||||
const { icon } = this;
|
const { icon } = this;
|
||||||
|
|
||||||
return html`
|
return html`
|
||||||
<div class="wrap" ?noicon=${!icon}>
|
<div part="wrap" class="wrap" ?noicon=${!icon}>
|
||||||
${icon ? html`
|
${icon ? html`
|
||||||
<tp-icon part="icon" .icon=${icon}></tp-icon>
|
<tp-icon part="icon" .icon=${icon}></tp-icon>
|
||||||
` : null}
|
` : null}
|
||||||
|
|||||||
Reference in New Issue
Block a user