Do not use internal and actual values anymore (Fixes #42)

This commit is contained in:
uwap 2018-06-28 21:25:06 +02:00
parent b40f4a774e
commit c0117fa7d6
13 changed files with 421 additions and 393 deletions

View file

@ -12,7 +12,7 @@ import { Toggle, DropDown, Link,
export type UiItemListProps = {
controls: Array<ControlUI>,
state: State,
onChangeState: (topic: string, nextState: Actual) => void
onChangeState: (topic: string, nextState: string) => void
};
export default class UiItemList extends React.PureComponent<UiItemListProps> {
@ -34,7 +34,7 @@ export default class UiItemList extends React.PureComponent<UiItemListProps> {
<ListItem key={key}>
{control.icon == null ||
<ListItemIcon>
{renderIcon(control.icon, this.props.state, "mdi-24px")}
{renderIcon(control.icon(this.props.state), "mdi-24px")}
</ListItemIcon>}
{this.renderControl(control)}
</ListItem>