blob: 9b54c01e926a816abe7f62e9990fb7fc41da03ce [file] [log] [blame]
Philip Zeyliger254c49f2025-07-17 17:26:24 -07001import { html, LitElement } from "lit";
2import { customElement, state } from "lit/decorators.js";
3import { MockGitDataService } from "./mock-git-data-service.js";
4import "../sketch-push-button.js";
5
6@customElement("sketch-push-button-demo")
7export class SketchPushButtonDemo extends LitElement {
8 @state()
9 private _gitDataService = new MockGitDataService();
10
11 protected createRenderRoot() {
12 return this;
13 }
14
15 render() {
16 return html`
17 <div
18 class="p-4 bg-white rounded-lg shadow-sm border border-gray-200 max-w-md mx-auto"
19 >
20 <h2 class="text-lg font-semibold mb-4">Push Button Demo</h2>
21
22 <div class="mb-4">
23 <p class="text-sm text-gray-600 mb-2">
24 Test the push button component:
25 </p>
26 <sketch-push-button></sketch-push-button>
27 </div>
28
29 <div class="text-xs text-gray-500">
30 <p>Click the push button to test:</p>
31 <ul class="list-disc list-inside mt-1">
32 <li>Modal opens with git information</li>
33 <li>Input fields can be disabled during loading</li>
34 <li>Buttons show individual spinners</li>
35 <li>No full modal overwrite during operations</li>
36 </ul>
37 </div>
38 </div>
39 `;
40 }
41}
42
43declare global {
44 interface HTMLElementTagNameMap {
45 "sketch-push-button-demo": SketchPushButtonDemo;
46 }
47}