mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-27 11:16:35 +00:00
Add warning color for menu item (#20317)
* Add warning color for menu item * align icons
This commit is contained in:
parent
48ee3a34eb
commit
912d2cbd79
@ -26,6 +26,10 @@ export class HaMenuItem extends MdMenuItem {
|
|||||||
--md-sys-color-on-primary-container: var(--primary-text-color);
|
--md-sys-color-on-primary-container: var(--primary-text-color);
|
||||||
--md-sys-color-on-secondary-container: var(--primary-text-color);
|
--md-sys-color-on-secondary-container: var(--primary-text-color);
|
||||||
}
|
}
|
||||||
|
:host(.warning) {
|
||||||
|
--md-menu-item-label-text-color: var(--error-color);
|
||||||
|
--md-menu-item-leading-icon-color: var(--error-color);
|
||||||
|
}
|
||||||
`,
|
`,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -11,10 +11,8 @@ import {
|
|||||||
mdiInformationOutline,
|
mdiInformationOutline,
|
||||||
mdiMenuDown,
|
mdiMenuDown,
|
||||||
mdiPlay,
|
mdiPlay,
|
||||||
mdiPlayCircleOutline,
|
|
||||||
mdiPlus,
|
mdiPlus,
|
||||||
mdiRobotHappy,
|
mdiRobotHappy,
|
||||||
mdiStopCircleOutline,
|
|
||||||
mdiTag,
|
mdiTag,
|
||||||
mdiToggleSwitch,
|
mdiToggleSwitch,
|
||||||
mdiToggleSwitchOffOutline,
|
mdiToggleSwitchOffOutline,
|
||||||
@ -60,6 +58,7 @@ import "../../../components/ha-filter-labels";
|
|||||||
import "../../../components/ha-icon-button";
|
import "../../../components/ha-icon-button";
|
||||||
import "../../../components/ha-icon-overflow-menu";
|
import "../../../components/ha-icon-overflow-menu";
|
||||||
import "../../../components/ha-menu";
|
import "../../../components/ha-menu";
|
||||||
|
import type { HaMenu } from "../../../components/ha-menu";
|
||||||
import "../../../components/ha-menu-item";
|
import "../../../components/ha-menu-item";
|
||||||
import "../../../components/ha-sub-menu";
|
import "../../../components/ha-sub-menu";
|
||||||
import "../../../components/ha-svg-icon";
|
import "../../../components/ha-svg-icon";
|
||||||
@ -101,7 +100,6 @@ import { turnOnOffEntity } from "../../lovelace/common/entity/turn-on-off-entity
|
|||||||
import { showAssignCategoryDialog } from "../category/show-dialog-assign-category";
|
import { showAssignCategoryDialog } from "../category/show-dialog-assign-category";
|
||||||
import { configSections } from "../ha-panel-config";
|
import { configSections } from "../ha-panel-config";
|
||||||
import { showNewAutomationDialog } from "./show-dialog-new-automation";
|
import { showNewAutomationDialog } from "./show-dialog-new-automation";
|
||||||
import type { HaMenu } from "../../../components/ha-menu";
|
|
||||||
|
|
||||||
type AutomationItem = AutomationEntity & {
|
type AutomationItem = AutomationEntity & {
|
||||||
name: string;
|
name: string;
|
||||||
@ -694,8 +692,8 @@ class HaAutomationPicker extends SubscribeMixin(LitElement) {
|
|||||||
<ha-svg-icon
|
<ha-svg-icon
|
||||||
.path=${
|
.path=${
|
||||||
this._overflowAutomation?.state === "off"
|
this._overflowAutomation?.state === "off"
|
||||||
? mdiPlayCircleOutline
|
? mdiToggleSwitch
|
||||||
: mdiStopCircleOutline
|
: mdiToggleSwitchOffOutline
|
||||||
}
|
}
|
||||||
slot="start"
|
slot="start"
|
||||||
></ha-svg-icon>
|
></ha-svg-icon>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user