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