Make sure we have no ha-icon in supervisor (#10176)

This commit is contained in:
Bram Kragten
2021-10-07 00:41:37 +02:00
committed by GitHub
parent fb1deb838c
commit 9e35c1ab68
8 changed files with 23 additions and 26 deletions

View File

@@ -1,4 +1,5 @@
import { Layout1d, scroll } from "@lit-labs/virtualizer";
import { mdiArrowDown, mdiArrowUp } from "@mdi/js";
import deepClone from "deep-clone-simple";
import {
css,
@@ -27,7 +28,7 @@ import { nextRender } from "../../common/util/render-status";
import { haStyleScrollbar } from "../../resources/styles";
import "../ha-checkbox";
import type { HaCheckbox } from "../ha-checkbox";
import "../ha-icon";
import "../ha-svg-icon";
import { filterData, sortData } from "./sort-filter";
declare global {
@@ -311,11 +312,11 @@ export class HaDataTable extends LitElement {
>
${column.sortable
? html`
<ha-icon
.icon=${sorted && this._sortDirection === "desc"
? "hass:arrow-down"
: "hass:arrow-up"}
></ha-icon>
<ha-svg-icon
.path=${sorted && this._sortDirection === "desc"
? mdiArrowDown
: mdiArrowUp}
></ha-svg-icon>
`
: ""}
<span>${column.title}</span>
@@ -863,14 +864,14 @@ export class HaDataTable extends LitElement {
:host([dir="rtl"]) .mdc-data-table__header-cell > * {
transition: right 0.2s ease;
}
.mdc-data-table__header-cell ha-icon {
.mdc-data-table__header-cell ha-svg-icon {
top: -3px;
position: absolute;
}
.mdc-data-table__header-cell.not-sorted ha-icon {
.mdc-data-table__header-cell.not-sorted ha-svg-icon {
left: -20px;
}
:host([dir="rtl"]) .mdc-data-table__header-cell.not-sorted ha-icon {
:host([dir="rtl"]) .mdc-data-table__header-cell.not-sorted ha-svg-icon {
right: -20px;
}
.mdc-data-table__header-cell.sortable:not(.not-sorted) span,
@@ -886,16 +887,16 @@ export class HaDataTable extends LitElement {
left: auto;
right: 24px;
}
.mdc-data-table__header-cell.sortable:not(.not-sorted) ha-icon,
.mdc-data-table__header-cell.sortable:hover.not-sorted ha-icon {
.mdc-data-table__header-cell.sortable:not(.not-sorted) ha-svg-icon,
.mdc-data-table__header-cell.sortable:hover.not-sorted ha-svg-icon {
left: 12px;
}
:host([dir="rtl"])
.mdc-data-table__header-cell.sortable:not(.not-sorted)
ha-icon,
ha-svg-icon,
:host([dir="rtl"])
.mdc-data-table__header-cell.sortable:hover.not-sorted
ha-icon {
ha-svg-icon {
left: auto;
right: 12px;
}