forked from MapComplete/MapComplete
Add small overview document for every layer
This commit is contained in:
parent
eba52836b2
commit
77e9151095
41 changed files with 1325 additions and 2040 deletions
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue