1
0
mirror of https://github.com/home-assistant/frontend.git synced 2026-04-18 07:56:44 +01:00

Add leading icon slot to expansion panel and fix left-chevron property (#24635)

* Add leading icon slot to expansion panel and fix left chevron

* Update components
This commit is contained in:
Paul Bottein
2025-03-17 20:23:20 +01:00
committed by GitHub
parent 4f7d5053ec
commit 3c11323ea4
26 changed files with 105 additions and 86 deletions

View File

@@ -1,4 +1,4 @@
import { mdiPacMan } from "@mdi/js";
import { mdiLightbulbOn, mdiPacMan } from "@mdi/js";
import type { TemplateResult } from "lit";
import { css, html, LitElement } from "lit";
import { customElement } from "lit/decorators";
@@ -125,6 +125,23 @@ const SAMPLES: {
`;
},
},
{
template(slot, leftChevron) {
return html`
<ha-expansion-panel
slot=${slot}
.leftChevron=${leftChevron}
header="Attr Header with actions"
>
<ha-svg-icon
slot="leading-icon"
.path=${mdiLightbulbOn}
></ha-svg-icon>
${SHORT_TEXT}
</ha-expansion-panel>
`;
},
},
];
@customElement("demo-components-ha-expansion-panel")