mirror of
https://github.com/home-assistant/frontend.git
synced 2026-05-08 17:28:46 +01:00
Make storage charts consistent with lifetime chart (#29526)
* Make storage charts consistent with lifetime chart * Update src/panels/config/storage/storage-breakdown-chart.ts --------- Co-authored-by: Petar Petrov <MindFreeze@users.noreply.github.com>
This commit is contained in:
@@ -55,17 +55,16 @@ export class StorageBreakdownChart extends LitElement {
|
||||
<span class="heading">${heading}</span>
|
||||
<span class="description">${description}</span>
|
||||
</div>
|
||||
${hasChildren
|
||||
? html`<ha-icon-button
|
||||
.path=${this._chartType === "sunburst"
|
||||
? mdiViewArray
|
||||
: mdiChartDonutVariant}
|
||||
.label=${this.hass.localize(
|
||||
"ui.panel.config.storage.change_chart_type"
|
||||
)}
|
||||
@click=${this._handleChartTypeChange}
|
||||
></ha-icon-button>`
|
||||
: nothing}
|
||||
<ha-icon-button
|
||||
.path=${this._chartType === "sunburst"
|
||||
? mdiViewArray
|
||||
: mdiChartDonutVariant}
|
||||
.label=${this.hass.localize(
|
||||
"ui.panel.config.storage.change_chart_type"
|
||||
)}
|
||||
.disabled=${!hasChildren}
|
||||
@click=${this._handleChartTypeChange}
|
||||
></ha-icon-button>
|
||||
</div>
|
||||
|
||||
<div class="chart-container ${this._chartType}">
|
||||
@@ -213,26 +212,24 @@ export class StorageBreakdownChart extends LitElement {
|
||||
static styles = css`
|
||||
.header {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
margin-bottom: var(--ha-space-2);
|
||||
align-items: flex-end;
|
||||
gap: var(--ha-space-2);
|
||||
}
|
||||
|
||||
.heading-text {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--ha-space-1);
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.heading {
|
||||
font-weight: 500;
|
||||
font-size: var(--ha-font-size-m);
|
||||
color: var(--primary-text-color);
|
||||
line-height: var(--ha-line-height-expanded);
|
||||
margin-right: var(--ha-space-2);
|
||||
}
|
||||
|
||||
.description {
|
||||
font-size: var(--ha-font-size-s);
|
||||
color: var(--secondary-text-color);
|
||||
line-height: var(--ha-line-height-expanded);
|
||||
}
|
||||
|
||||
ha-icon-button {
|
||||
|
||||
Reference in New Issue
Block a user