Toggle Conditions, Enable Conditions

This commit is contained in:
uwap 2017-09-17 05:00:07 +02:00
parent eb96d9d511
commit d121928df6
3 changed files with 52 additions and 11 deletions

View file

@ -13,8 +13,15 @@ declare type ControlUI = {
type: "toggle" | "dropDown",
text: string,
topic: string,
enableCondition?: (val: any) => boolean,
// TOGGLE optional properties
on?: string, // on override for toggle
off?: string, // off override for toggle
toggled?: (val: any) => boolean,
// DROPDOWN optional properties
options?: Map<string,any> //options for dropDown
};