Fix the icon color + allow changing icons depending on the state

This commit is contained in:
uwap 2017-11-11 05:44:04 +01:00
parent 2c433c7df0
commit bcb35877c1
7 changed files with 47 additions and 13 deletions

View file

@ -42,8 +42,16 @@ declare type ControlUI = {
declare type Control = {
name: string,
position: Array<number>,
icon: string,
iconColor?: (state: State) => string,
icon: string | (
internals: Map<string, string>,
actuals: Map<string, any>,
state: State
) => string,
iconColor?: (
internals: Map<string, string>,
actuals: Map<string, any>,
state: State
) => string,
ui: Array<ControlUI>
};
declare type Controls = Map<string,Control>;