(container: HTMLElement, el: PropEl)
| 565 | } |
| 566 | |
| 567 | function appendAttributesSection(container: HTMLElement, el: PropEl) { |
| 568 | const sec = propSection("Attributes"); |
| 569 | const attrs = Object.entries(el.attributes).filter( |
| 570 | ([k]) => !k.startsWith("data-hf-") && k !== "class" && k !== "style", |
| 571 | ); |
| 572 | for (const [name, val] of attrs) sec.appendChild(attrRow(name, val)); |
| 573 | if (attrs.length === 0) sec.appendChild(mkNote("no attributes")); |
| 574 | container.appendChild(sec); |
| 575 | } |
| 576 | |
| 577 | function appendDangerSection(container: HTMLElement) { |
| 578 | const sec = propSection("Danger"); |
no test coverage detected