Add icons, add validation, add phone and email types, add css fixes

This commit is contained in:
Pieter Vander Vennet 2020-07-26 02:01:34 +02:00
parent eb4dda1ba2
commit 1372027dac
56 changed files with 2794 additions and 3474 deletions

View file

@ -3,15 +3,19 @@ import {UIEventSource} from "../UI/UIEventSource";
export class LocalStorageSource {
static Get(key: string, defaultValue: string = undefined): UIEventSource<string> {
//*
// ignore when running from the console
return new UIEventSource<string>(defaultValue);
/*/
const saved = localStorage.getItem(key);
const source = new UIEventSource<string>(saved ?? defaultValue);
// ignore when running from the console
source.addCallback((data) => {
localStorage.setItem(key, data);
console.log("Wriging ", key, data)
});
return source;
//*/
}
}