mirror of
https://github.com/home-assistant/frontend.git
synced 2025-11-08 18:39:40 +00:00
Replace all default exports in common/ with named exports (#3790)
This commit is contained in:
committed by
Bram Kragten
parent
f871387fa6
commit
1f4d359050
@@ -2,7 +2,7 @@ import { HassEntity } from "home-assistant-js-websocket";
|
||||
|
||||
/** Return an icon representing a binary sensor state. */
|
||||
|
||||
export default function binarySensorIcon(state: HassEntity) {
|
||||
export const binarySensorIcon = (state: HassEntity) => {
|
||||
const activated = state.state && state.state === "off";
|
||||
switch (state.attributes.device_class) {
|
||||
case "battery":
|
||||
@@ -48,4 +48,4 @@ export default function binarySensorIcon(state: HassEntity) {
|
||||
default:
|
||||
return activated ? "hass:radiobox-blank" : "hass:checkbox-marked-circle";
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user