Sha256: 883f05bc8e80f904a14abd9410ede25efe0d20303041634637454f939ebec754
Contents?: true
Size: 476 Bytes
Versions: 17
Compression:
Stored size: 476 Bytes
Contents
import { htmlAttributes } from "../html/html-attributes"; export class Code { attributes: Record<string, any>; children: any[]; constructor(attributes: Record<string, any> = {}) { this.children = []; this.attributes = attributes; } get render(): string { return `<code ${htmlAttributes(this.attributes)}>${this.children.map(child => child.render).join("")}</code>`; } add(child: any): Code { this.children.push(child); return this; } }
Version data entries
17 entries across 17 versions & 1 rubygems