storybook/docs/api/doc-blocks/doc-block-stories.mdx
Kyle Gach 09bd49af77 Fix incorrect relative links
On a page inside a new directory (e.g. `get-started/frameworks`), almost* every relative link that went up a level (e.g. `../writing-stories/args.mdx`) now needs to go up two levels (e.g. `../../writing-stories/args.mdx`).

* The exception is relative links pointing to directories that are siblings of the current directory, e.g. on `configure/integration`, a link to `../user-interface/sidebar.mdx` does _not_ need adjusted.
2024-06-27 22:22:39 -06:00

56 lines
1.1 KiB
Plaintext

---
title: 'Stories'
sidebar:
order: 11
title: Stories
---
<YouTubeCallout id="uAA1JvLcl-w" title="Avoid Documentation Nightmares with Storybook's Stories Doc Block" params="start=185" />
The `Stories` block renders the full collection of stories in a stories file.
![Screenshot of Stories block](../../_assets/doc-blocks/doc-block-stories.png)
{/* prettier-ignore-start */}
```md
{/* ButtonDocs.mdx */}
import { Meta, Stories } from '@storybook/blocks';
import * as ButtonStories from './Button.stories';
<Meta of={ButtonStories} />
<Stories />
```
{/* prettier-ignore-end */}
## Stories
```js
import { Stories } from '@storybook/blocks';
```
`Stories` is configured with the following props:
### `includePrimary`
Type: `boolean`
Default: `true`
Determines if the collection of stories includes the primary (first) story.
<Callout variant="info" icon="💡">
If a stories file contains only one story and `includePrimary={true}`, the `Stories` block will render nothing to avoid a potentially confusing situation.
</Callout>
### `title`
Type: `string`
Default: `'Stories'`
Sets the heading content preceding the collection of stories.