feat(components): add large set of new UI components and demos, reorganize groups, and bump a few dependencies
This commit is contained in:
84
ts_web/elements/00group-media/dees-tile-image/demo.ts
Normal file
84
ts_web/elements/00group-media/dees-tile-image/demo.ts
Normal file
@@ -0,0 +1,84 @@
|
||||
import { html } from '@design.estate/dees-element';
|
||||
|
||||
export const demo = () => html`
|
||||
<style>
|
||||
.demo-container {
|
||||
padding: 40px;
|
||||
background: #f5f5f5;
|
||||
}
|
||||
.demo-section {
|
||||
margin-bottom: 60px;
|
||||
}
|
||||
h3 {
|
||||
margin-bottom: 20px;
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
}
|
||||
.tile-row {
|
||||
display: flex;
|
||||
gap: 24px;
|
||||
flex-wrap: wrap;
|
||||
align-items: flex-start;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="demo-container">
|
||||
<div class="demo-section">
|
||||
<h3>Image Tiles</h3>
|
||||
<div class="tile-row">
|
||||
<dees-tile-image
|
||||
src="https://picsum.photos/800/600"
|
||||
alt="Landscape photo"
|
||||
label="landscape.jpg"
|
||||
@tile-click=${(e: CustomEvent) => console.log('Image clicked:', e.detail)}
|
||||
></dees-tile-image>
|
||||
|
||||
<dees-tile-image
|
||||
src="https://picsum.photos/400/400"
|
||||
alt="Square photo"
|
||||
label="square.png"
|
||||
></dees-tile-image>
|
||||
|
||||
<dees-tile-image
|
||||
src="https://picsum.photos/300/900"
|
||||
alt="Portrait photo"
|
||||
label="portrait.webp"
|
||||
></dees-tile-image>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="demo-section">
|
||||
<h3>Size Variants</h3>
|
||||
<div class="tile-row">
|
||||
<dees-tile-image
|
||||
size="small"
|
||||
src="https://picsum.photos/200/200"
|
||||
alt="Small"
|
||||
label="small.jpg"
|
||||
></dees-tile-image>
|
||||
|
||||
<dees-tile-image
|
||||
src="https://picsum.photos/600/400"
|
||||
alt="Default"
|
||||
label="default.jpg"
|
||||
></dees-tile-image>
|
||||
|
||||
<dees-tile-image
|
||||
size="large"
|
||||
src="https://picsum.photos/1200/800"
|
||||
alt="Large"
|
||||
label="large.jpg"
|
||||
></dees-tile-image>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="demo-section">
|
||||
<h3>Error State (broken URL)</h3>
|
||||
<dees-tile-image
|
||||
src="https://invalid-url-that-does-not-exist.example/image.png"
|
||||
alt="Broken"
|
||||
label="broken.png"
|
||||
></dees-tile-image>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
Reference in New Issue
Block a user