mirror of
https://github.com/picocss/pico.git
synced 2025-04-26 19:26:14 -04:00
feat: add StorybookJS
This commit is contained in:
parent
1039a4788d
commit
cbc1260553
116 changed files with 3560 additions and 2 deletions
57
stories/sectioning/search.stories.ts
Normal file
57
stories/sectioning/search.stories.ts
Normal file
|
@ -0,0 +1,57 @@
|
|||
import { createHTMLElement } from "../HTMLElement";
|
||||
|
||||
export default {
|
||||
title: "Sectioning/Search",
|
||||
tags: ["autodocs"],
|
||||
args: {
|
||||
content: "Content",
|
||||
},
|
||||
// Render the <html> element
|
||||
render: (args) => {
|
||||
return createHTMLElement("search", args);
|
||||
},
|
||||
};
|
||||
|
||||
export const Default = {};
|
||||
|
||||
export const MozillaExample = {
|
||||
render: (args) => `<search>
|
||||
<label>
|
||||
Find and filter your query
|
||||
<input type="search" id="query" />
|
||||
</label>
|
||||
<label>
|
||||
<input type="checkbox" id="exact-only" />
|
||||
Exact matches only
|
||||
</label>
|
||||
|
||||
<section>
|
||||
<h3>Results:</h3>
|
||||
<ul id="results">
|
||||
<!-- search result content -->
|
||||
</ul>
|
||||
<output id="no-results">
|
||||
<!-- no results content -->
|
||||
</output>
|
||||
</section>
|
||||
</search>
|
||||
`,
|
||||
};
|
||||
|
||||
export const MozillaExample2 = {
|
||||
render: (args) => `<header>
|
||||
<h1>Car rental agency</h1>
|
||||
<search title="Website">...</search>
|
||||
</header>
|
||||
<main>
|
||||
<h2>Cars available for rent</h2>
|
||||
<search title="Cars">
|
||||
<h3>Filter results</h3>
|
||||
...
|
||||
</search>
|
||||
<article>
|
||||
<!-- search result content -->
|
||||
</article>
|
||||
</main>
|
||||
`,
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue