Sha256: 600cbcfb3b1d0ae817996bf9d5d61b0642eef15bc67e86ed2637a100c7c92db8
Contents?: true
Size: 471 Bytes
Versions: 17
Compression:
Stored size: 471 Bytes
Contents
import { htmlAttributes } from "../html/html-attributes"; export class Image { attributes: Record<string, any>; children: any[]; src: string; alt: string; constructor(src: string, alt: string, attributes: Record<string, any> = {}) { this.children = []; this.attributes = attributes; this.src = src; this.alt = alt; } get render(): string { return `<img src='${this.src}' alt='${this.alt}' ${htmlAttributes(this.attributes)}/>`; } }
Version data entries
17 entries across 17 versions & 1 rubygems