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