mirror of
https://github.com/picocss/pico.git
synced 2025-04-25 10:46:14 -04:00
feat: add StorybookJS
This commit is contained in:
parent
1039a4788d
commit
cbc1260553
116 changed files with 3560 additions and 2 deletions
33
stories/text-content/menu.stories.ts
Normal file
33
stories/text-content/menu.stories.ts
Normal file
|
@ -0,0 +1,33 @@
|
|||
import { createHTMLElement } from "../HTMLElement";
|
||||
|
||||
export default {
|
||||
title: "TextContent/Menu",
|
||||
tags: ["autodocs"],
|
||||
args: {
|
||||
content: "Content",
|
||||
},
|
||||
// Render the <html> element
|
||||
render: (args) => {
|
||||
return createHTMLElement("menu", args);
|
||||
},
|
||||
};
|
||||
|
||||
export const Default = {};
|
||||
|
||||
export const MozillaExample = {
|
||||
render: () => `<div class="news">
|
||||
<a href="#">NASA’s Webb Delivers Deepest Infrared Image of Universe Yet</a>
|
||||
<menu>
|
||||
<li><button id="save">Save for later</button></li>
|
||||
<li><button id="share">Share this news</button></li>
|
||||
</menu>
|
||||
</div>`,
|
||||
};
|
||||
|
||||
export const MozillaExample2 = {
|
||||
render: () => `<menu>
|
||||
<li><button onclick="copy()">Copy</button></li>
|
||||
<li><button onclick="cut()">Cut</button></li>
|
||||
<li><button onclick="paste()">Paste</button></li>
|
||||
</menu>`,
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue