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