Sha256: a22c3218fbbb35d1260ade90af9daf2aadb2b2d21afd8b91f8943fd8b47d23d2
Contents?: true
Size: 480 Bytes
Versions: 17
Compression:
Stored size: 480 Bytes
Contents
import { htmlAttributes } from "../html/html-attributes"; export class Paragraph { attributes: Record<string, any>; children: any[]; constructor(attributes: Record<string, any> = {}) { this.children = []; this.attributes = attributes; } get render(): string { return `<p ${htmlAttributes(this.attributes)}>${this.children.map(child => child.render).join("")}</p>`; } add(child: any): Paragraph { this.children.push(child); return this; } }
Version data entries
17 entries across 17 versions & 1 rubygems