Do not use internal and actual values anymore (Fixes #42)
This commit is contained in:
parent
b40f4a774e
commit
c0117fa7d6
13 changed files with 421 additions and 393 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue