picocss/stories/image-and-multimedia/img.stories.ts

31 lines
768 B
TypeScript
Raw Normal View History

2025-04-04 11:51:33 +02:00
import { createHTMLElement } from "../HTMLElement";
export default {
title: "ImageAndMultimedia/Img",
tags: ["autodocs"],
args: {
src: "https://picsum.photos/200/300",
alt: "Sample Image",
attributionsrc: "https://example.com/attribution",
crossorigin: "anonymous",
decoding: "async",
elementtiming: "image",
fetchpriority: "high",
height: 300,
width: 200,
ismap: false,
loading: "lazy",
referrerpolicy: "no-referrer",
sizes: "(max-width: 600px) 100vw, 50vw",
srcset:
"https://picsum.photos/200/300 200w, https://picsum.photos/400/600 400w",
usemap: "#map",
},
// Render the <html> element
render: (args) => {
return createHTMLElement("img", args);
},
};
export const Default = {};