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