comparison design_system/src/components/story.js @ 254:2b6e732087ff

[ui] Add complete native component catalog Co-authored-by: Copilot <[email protected]>
author MrJuneJune <me@mrjunejune.com>
date Tue, 04 Aug 2026 15:12:09 -0700
parents 117c4d53c9a4
children
comparison
equal deleted inserted replaced
253:fdf3816959cb 254:2b6e732087ff
7 ? Math.min(...indentation) 7 ? Math.min(...indentation)
8 : 0; 8 : 0;
9 return lines.map(line => line.slice(minimum)).join("\n"); 9 return lines.map(line => line.slice(minimum)).join("\n");
10 } 10 }
11 11
12 /**
13 * Renders a declarative component example and its copyable HTML source.
14 *
15 * @extends {HTMLElement}
16 */
12 export class ZenStory extends HTMLElement { 17 export class ZenStory extends HTMLElement {
13 connectedCallback() { 18 connectedCallback() {
14 if (this.dataset.ready === "true") return; 19 if (this.dataset.ready === "true") return;
15 const template = this.querySelector(":scope > template"); 20 const template = this.querySelector(":scope > template");
16 if (!template) return; 21 if (!template) return;