Docs: Add Preact code snippet for Whats a Story

This commit is contained in:
fbredius-hp 2022-02-23 11:42:21 +01:00
parent 75b841912c
commit 40f983487b
2 changed files with 15 additions and 0 deletions

View File

@ -27,6 +27,7 @@ Lets start with the `Button` component. A story is a function that describes
'web-components/button-story.js.mdx',
'html/button-story.js.mdx',
'html/button-story.ts.mdx',
'preact/button-story.js.mdx',
]}
/>

View File

@ -0,0 +1,14 @@
```js
// Button.stories.js|jsx
/** @jsx h */
import { h } from 'preact';
import { Button } from './Button';
export default {
title: 'Button',
component: Button,
}
export const Primary = () => <Button primary label='Button' />;
```