Improve the entire icon logic
- Tree Shaking for Icons (Closes #53) - New API for the config (See https://github.com/uwap/mqtt-control-map/wiki/Icons) - Icons can now be colored everywhere, not just on the map
This commit is contained in:
parent
43a33c3ab3
commit
856aab41ad
18 changed files with 288 additions and 269 deletions
|
|
@ -2,7 +2,8 @@
|
|||
import type { Config } from "config/flowtypes";
|
||||
import { hex } from "config/colors";
|
||||
import * as types from "config/types";
|
||||
import { mdi } from "config/icon";
|
||||
import * as icons from "@mdi/js";
|
||||
import { svg } from "config/icon";
|
||||
|
||||
const config: Config = {
|
||||
space: {
|
||||
|
|
@ -32,20 +33,19 @@ const config: Config = {
|
|||
hauptraumTableLight: {
|
||||
name: "Hauptraum Tisch",
|
||||
position: [450, 450],
|
||||
icon: mdi("white-balance-iridescent"),
|
||||
iconColor: () => hex("#000000"),
|
||||
icon: svg(icons.mdiWhiteBalanceIridescent),
|
||||
ui: [
|
||||
{
|
||||
type: "toggle",
|
||||
text: "Licht",
|
||||
topic: "hauptraumTableLight",
|
||||
icon: mdi("power")
|
||||
icon: svg(icons.mdiPower)
|
||||
},
|
||||
{
|
||||
type: "toggle",
|
||||
text: "Licht",
|
||||
topic: "hauptraumTableLightOnHack",
|
||||
icon: mdi("power")
|
||||
icon: svg(icons.mdiPower)
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue