mirror of
https://github.com/picocss/pico.git
synced 2025-04-29 12:29:13 -04:00
feat: add StorybookJS
This commit is contained in:
parent
1039a4788d
commit
cbc1260553
116 changed files with 3560 additions and 2 deletions
30
stories/image-and-multimedia/img.stories.ts
Normal file
30
stories/image-and-multimedia/img.stories.ts
Normal file
|
@ -0,0 +1,30 @@
|
|||
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 = {};
|
Loading…
Add table
Add a link
Reference in a new issue