mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-07 15:21:53 +08:00
- Rename `introduction.md`, `overview.md`, `how-to-contribute.md` pages -> `index.md` pages - Add all-new `index.md` pages for Sharing and API - Find/replace `introduction.md`/`overview.md` -> `index.md` - Find/replace `/introduction`/`/overview` -> `/` - Add `hideRendererSelector: true` to frontmatter of (some) pages that aren't conditional on renderer
27 lines
534 B
Plaintext
27 lines
534 B
Plaintext
```js
|
|
// Button.stories.js|jsx
|
|
|
|
import React from 'react';
|
|
|
|
import { Button } from './Button';
|
|
|
|
export default {
|
|
/* 👇 The title prop is optional.
|
|
* See https://storybook.js.org/docs/configure/#configure-story-loading
|
|
* to learn how to generate automatic titles
|
|
*/
|
|
title: 'Button',
|
|
component: Button,
|
|
//👇 Creates specific parameters for the story
|
|
parameters: {
|
|
myAddon: {
|
|
data: 'This data is passed to the addon',
|
|
},
|
|
},
|
|
};
|
|
|
|
export const Basic = {
|
|
render: () => <Button>Hello</Button>,
|
|
};
|
|
```
|