forked from MapComplete/MapComplete
		
	
		
			
				
	
	
		
			29 lines
		
	
	
		
			No EOL
		
	
	
		
			604 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
		
			No EOL
		
	
	
		
			604 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
import BaseUIElement from "../BaseUIElement";
 | 
						|
 | 
						|
export class FixedUiElement extends BaseUIElement {
 | 
						|
    public readonly content: string;
 | 
						|
 | 
						|
    constructor(html: string) {
 | 
						|
        super();
 | 
						|
        this.content = html ?? "";
 | 
						|
    }
 | 
						|
 | 
						|
    InnerRender(): string {
 | 
						|
        return this.content;
 | 
						|
    }
 | 
						|
 | 
						|
    AsMarkdown(): string {
 | 
						|
        if(this.HasClass("code")){
 | 
						|
            return "`"+this.content+"`"
 | 
						|
        }
 | 
						|
        return this.content;
 | 
						|
    }
 | 
						|
 | 
						|
    protected InnerConstructElement(): HTMLElement {
 | 
						|
        const e = document.createElement("span")
 | 
						|
        e.innerHTML = this.content
 | 
						|
        return e;
 | 
						|
    }
 | 
						|
 | 
						|
 | 
						|
} |