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 @@
|
||||
/**
|
||||
@license
|
||||
Copyright (c) 2024 trading_peter
|
||||
Copyright (c) 2026 trading_peter
|
||||
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);
|
||||
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;
|
||||
|
||||
return html`
|
||||
<div class="wrap" ?noicon=${!icon}>
|
||||
<div part="wrap" class="wrap" ?noicon=${!icon}>
|
||||
${icon ? html`
|
||||
<tp-icon part="icon" .icon=${icon}></tp-icon>
|
||||
` : null}
|
||||
|
||||
Reference in New Issue
Block a user