Add small overview document for every layer

This commit is contained in:
Pieter Vander Vennet 2022-01-14 19:34:00 +01:00
parent eba52836b2
commit 77e9151095
41 changed files with 1325 additions and 2040 deletions

View file

@ -1,5 +1,6 @@
import {UIEventSource} from "../../Logic/UIEventSource";
import BaseUIElement from "../BaseUIElement";
import Combine from "./Combine";
export class VariableUiElement extends BaseUIElement {
private readonly _contents: UIEventSource<string | BaseUIElement | BaseUIElement[]>;
@ -46,4 +47,15 @@ export class VariableUiElement extends BaseUIElement {
});
return el;
}
AsMarkdown(): string {
const d = this._contents.data;
if(typeof d === "string"){
return d;
}
if(d instanceof BaseUIElement){
return d.AsMarkdown()
}
return new Combine(<BaseUIElement[]>d).AsMarkdown()
}
}