Fix dissappearing welcome message, add typing and simplify code

This commit is contained in:
Pieter Vander Vennet 2022-09-27 18:48:02 +02:00
parent 491c46dbc6
commit a87fa4520b
5 changed files with 32 additions and 35 deletions

View file

@ -8,7 +8,7 @@ import Translations from "../i18n/Translations";
export class CheckBox extends InputElementMap<number[], boolean> {
constructor(el: (BaseUIElement | string), defaultValue?: boolean) {
super(
new CheckBoxes([Translations.T(el)]),
new CheckBoxes([Translations.W(el)]),
(x0, x1) => x0 === x1,
(t) => t.length > 0,
(x) => (x ? [0] : [])