forked from MapComplete/MapComplete
Refactoring: port doc generation to generate markdown directly without UIElements
This commit is contained in:
parent
7a7439b161
commit
8e9c03e258
17 changed files with 309 additions and 320 deletions
|
|
@ -99,15 +99,15 @@ export default class Validators {
|
|||
|
||||
private static _byType = Validators._byTypeConstructor()
|
||||
|
||||
public static HelpText(): BaseUIElement {
|
||||
const explanations: BaseUIElement[] = Validators.AllValidators.map((type) =>
|
||||
new Combine([new Title(type.name, 3), type.explanation]).SetClass("flex flex-col")
|
||||
public static HelpText(): string {
|
||||
const explanations: string[] = Validators.AllValidators.flatMap((type) =>
|
||||
["### "+type.name, type.explanation]
|
||||
)
|
||||
return new Combine([
|
||||
new Title("Available types for text fields", 1),
|
||||
return [
|
||||
"# Available types for text fields",
|
||||
"The listed types here trigger a special input element. Use them in `tagrendering.freeform.type` of your tagrendering to activate them",
|
||||
...explanations,
|
||||
]).SetClass("flex flex-col")
|
||||
].join("\n")
|
||||
}
|
||||
|
||||
private static _byTypeConstructor(): Map<ValidatorType, Validator> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue