mirror of
https://github.com/picocss/pico.git
synced 2025-04-28 20:09:13 -04:00
feat: add StorybookJS
This commit is contained in:
parent
1039a4788d
commit
cbc1260553
116 changed files with 3560 additions and 2 deletions
38
stories/sectioning/address.stories.ts
Normal file
38
stories/sectioning/address.stories.ts
Normal file
|
@ -0,0 +1,38 @@
|
|||
import { createHTMLElement } from "../HTMLElement";
|
||||
|
||||
export default {
|
||||
title: "Sectioning/Address",
|
||||
tags: ["autodocs"],
|
||||
args: {
|
||||
content: "Content",
|
||||
},
|
||||
// Render the <html> element
|
||||
render: (args) => {
|
||||
return `<address
|
||||
${Object.entries(args)
|
||||
.map(([key, value]) => {
|
||||
if (!value) {
|
||||
return "";
|
||||
}
|
||||
return `${key}="${value}"`;
|
||||
})
|
||||
.join(" ")}
|
||||
>${args.content}</address>`;
|
||||
},
|
||||
};
|
||||
|
||||
export const Default = {};
|
||||
|
||||
export const MozillaExample = {
|
||||
render: (args) => `<address>
|
||||
You can contact author at
|
||||
<a href="http://www.example.com/contact">www.example.com</a>.<br />
|
||||
If you see any bugs, please
|
||||
<a href="mailto:webmaster@example.com">contact webmaster</a>.<br />
|
||||
You may also want to visit us:<br />
|
||||
Mozilla Foundation<br />
|
||||
331 E Evelyn Ave<br />
|
||||
Mountain View, CA 94041<br />
|
||||
USA
|
||||
</address>`,
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue