Refactoring: remove AsMarkdown() from the old BaseUIElement

This commit is contained in:
Pieter Vander Vennet 2025-07-12 13:19:03 +02:00
parent 54265ba0c6
commit fb48c57e42
5 changed files with 2 additions and 49 deletions

View file

@ -1,4 +1,3 @@
import BaseUIElement from "../BaseUIElement"
import { Translation } from "../i18n/Translation"
import Translations from "../i18n/Translations"
@ -32,7 +31,7 @@ export abstract class Validator {
constructor(
name: string,
explanation: string | BaseUIElement,
explanation: string,
inputmode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search",
textArea?: false | boolean
) {
@ -45,11 +44,7 @@ export abstract class Validator {
if (this.name.endsWith("textfielddef")) {
this.name = this.name.substring(0, this.name.length - "TextFieldDef".length)
}
if (typeof explanation === "string") {
this.explanation = explanation
} else {
this.explanation = explanation.AsMarkdown()
}
this.explanation = explanation
}
/**