Completely rework how icons work in mqtt control map
This commit is contained in:
parent
8a37cf2c95
commit
ed0f22645e
14 changed files with 216 additions and 111 deletions
|
|
@ -2,7 +2,7 @@
|
|||
import React from "react";
|
||||
import ListItem from "@material-ui/core/ListItem";
|
||||
import ListItemIcon from "@material-ui/core/ListItemIcon";
|
||||
import { renderIcon } from "utils/parseIconName";
|
||||
import { renderIcon } from "config/icon";
|
||||
|
||||
import type { ControlUI } from "config/flowtypes";
|
||||
|
||||
|
|
@ -33,7 +33,9 @@ export default class UiItemList extends React.PureComponent<UiItemListProps> {
|
|||
return (
|
||||
<ListItem key={key}>
|
||||
{control.icon == null ||
|
||||
<ListItemIcon>{renderIcon(control.icon, "mdi-24px")}</ListItemIcon>}
|
||||
<ListItemIcon>
|
||||
{renderIcon(control.icon, this.props.state, "mdi-24px")}
|
||||
</ListItemIcon>}
|
||||
{this.renderControl(control)}
|
||||
</ListItem>
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue