More refactoring and fixes

This commit is contained in:
Pieter Vander Vennet 2022-06-06 19:37:22 +02:00
parent 1bc7d9118a
commit 9877abec17
14 changed files with 375 additions and 151 deletions

View file

@ -11,7 +11,7 @@ export default class Toggle extends VariableUiElement {
public readonly isEnabled: Store<boolean>;
constructor(showEnabled: string | BaseUIElement, showDisabled: string | BaseUIElement, isEnabled: Store<boolean> = new UIEventSource<boolean>(false)) {
constructor(showEnabled: string | BaseUIElement, showDisabled: string | BaseUIElement, isEnabled: Store<boolean>) {
super(
isEnabled?.map(isEnabled => isEnabled ? showEnabled : showDisabled)
);