Sha256: dc200e96dce6c60d62548ef7fec9fd6b2a49e164912c8de42314ef9bde28ace4
Contents?: true
Size: 472 Bytes
Versions: 17
Compression:
Stored size: 472 Bytes
Contents
import { htmlAttributes } from "../html/html-attributes"; export class List { 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 `<ul ${htmlAttributes(this.attributes)}>${this.children.map(child => child.render).join("")}</ul>`; } }
Version data entries
17 entries across 17 versions & 1 rubygems