Reformat all files with prettier
This commit is contained in:
parent
e22d189376
commit
b541d3eab4
382 changed files with 50893 additions and 35566 deletions
|
@ -1,33 +1,30 @@
|
|||
import BaseUIElement from "../BaseUIElement";
|
||||
import BaseUIElement from "../BaseUIElement"
|
||||
|
||||
export class Paragraph extends BaseUIElement {
|
||||
public readonly content: (string | BaseUIElement);
|
||||
public readonly content: string | BaseUIElement
|
||||
|
||||
constructor(html: (string | BaseUIElement)) {
|
||||
super();
|
||||
this.content = html ?? "";
|
||||
constructor(html: string | BaseUIElement) {
|
||||
super()
|
||||
this.content = html ?? ""
|
||||
}
|
||||
|
||||
|
||||
AsMarkdown(): string {
|
||||
let c:string ;
|
||||
if(typeof this.content !== "string"){
|
||||
c = this.content.AsMarkdown()
|
||||
}else{
|
||||
c = this.content
|
||||
}
|
||||
return "\n\n"+c+"\n\n"
|
||||
let c: string
|
||||
if (typeof this.content !== "string") {
|
||||
c = this.content.AsMarkdown()
|
||||
} else {
|
||||
c = this.content
|
||||
}
|
||||
return "\n\n" + c + "\n\n"
|
||||
}
|
||||
|
||||
protected InnerConstructElement(): HTMLElement {
|
||||
const e = document.createElement("p")
|
||||
if(typeof this.content !== "string"){
|
||||
if (typeof this.content !== "string") {
|
||||
e.appendChild(this.content.ConstructElement())
|
||||
}else{
|
||||
} else {
|
||||
e.innerHTML = this.content
|
||||
}
|
||||
return e;
|
||||
return e
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue