picocss/stories/text-content/pre.stories.ts
2025-04-04 11:51:33 +02:00

34 lines
814 B
TypeScript

import { createHTMLElement } from "../HTMLElement";
export default {
title: "TextContent/Pre",
tags: ["autodocs"],
args: {
content: "Content",
},
// Render the <html> element
render: (args) => {
return createHTMLElement("pre", args);
},
};
export const Default = {};
export const MozillaExample = {
render: () => `<figure>
<pre role="img" aria-label="ASCII COW">
___________________________
&lt; I'm an expert in my field. &gt;
---------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
</pre>
<figcaption id="cow-caption">
A cow saying, "I'm an expert in my field." The cow is illustrated using
preformatted text characters.
</figcaption>
</figure>`,
};