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