Sha256: 7f97073b767acff4ade91f369d465821044b3c4da3f9c059d29f4b1de9560349
Contents?: true
Size: 486 Bytes
Versions: 7
Compression:
Stored size: 486 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 renderWrapper(): string { return `<ul ${htmlAttributes(this.attributes)}>${this.children.map(child => child.renderWrapper).join("")}</ul>`; } }
Version data entries
7 entries across 7 versions & 1 rubygems