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