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