| Sean McCullough | 86b5686 | 2025-04-18 13:04:03 -0700 | [diff] [blame] | 1 | <html> |
| 2 | <head> |
| 3 | <title>sketch-timeline demo</title> |
| 4 | <link rel="stylesheet" href="demo.css" /> |
| Sean McCullough | 71941bd | 2025-04-18 13:31:48 -0700 | [diff] [blame] | 5 | <script |
| 6 | src="/dist/web-components/sketch-timeline.js" |
| 7 | type="module" |
| 8 | ></script> |
| Sean McCullough | 86b5686 | 2025-04-18 13:04:03 -0700 | [diff] [blame] | 9 | |
| 10 | <script> |
| 11 | const messages = [ |
| 12 | { |
| 13 | type: "user", |
| 14 | content: "a user message", |
| 15 | }, |
| 16 | { |
| 17 | type: "agent", |
| 18 | content: "an agent message", |
| 19 | }, |
| 20 | { |
| 21 | type: "agent", |
| 22 | content: "an agent message", |
| 23 | }, |
| 24 | { |
| 25 | type: "agent", |
| 26 | content: "an agent message", |
| 27 | }, |
| 28 | { |
| 29 | type: "user", |
| 30 | content: "a user message", |
| 31 | }, |
| 32 | { |
| 33 | type: "user", |
| 34 | content: "a user message", |
| 35 | }, |
| 36 | ]; |
| 37 | document.addEventListener("DOMContentLoaded", () => { |
| Sean McCullough | 71941bd | 2025-04-18 13:31:48 -0700 | [diff] [blame] | 38 | const timelineEl = document.querySelector("sketch-timeline"); |
| Sean McCullough | 86b5686 | 2025-04-18 13:04:03 -0700 | [diff] [blame] | 39 | timelineEl.messages = messages; |
| 40 | }); |
| 41 | </script> |
| Sean McCullough | 86b5686 | 2025-04-18 13:04:03 -0700 | [diff] [blame] | 42 | </head> |
| 43 | <body> |
| 44 | <h1>sketch-timeline demo</h1> |
| 45 | |
| 46 | <sketch-timeline></sketch-timeline> |
| Sean McCullough | 86b5686 | 2025-04-18 13:04:03 -0700 | [diff] [blame] | 47 | </body> |
| Sean McCullough | 71941bd | 2025-04-18 13:31:48 -0700 | [diff] [blame] | 48 | </html> |