mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 05:51:48 +08:00
42 lines
802 B
Markdown
42 lines
802 B
Markdown
---
|
|
title: 'Subtitle'
|
|
---
|
|
|
|
<YouTubeCallout id="uAA1JvLcl-w" title="Avoid Documentation Nightmares with Storybook's Subtitle Doc Block" params='start=98' />
|
|
|
|
The `Subtitle` block can serve as a secondary heading for your docs entry.
|
|
|
|

|
|
|
|
<!-- prettier-ignore-start -->
|
|
```md
|
|
{/* ButtonDocs.mdx */}
|
|
|
|
import { Subtitle } from '@storybook/blocks';
|
|
|
|
<Subtitle>This is the subtitle</Subtitle>
|
|
```
|
|
<!-- prettier-ignore-end -->
|
|
|
|
## Subtitle
|
|
|
|
```js
|
|
import { Subtitle } from '@storybook/blocks';
|
|
```
|
|
|
|
`Subtitle` is configured with the following props:
|
|
|
|
### `children`
|
|
|
|
Type: `JSX.Element | string`
|
|
|
|
Default: `parameters.docs.subtitle`
|
|
|
|
Provides the content.
|
|
|
|
### `of`
|
|
|
|
Type: CSF file exports
|
|
|
|
Specifies which meta's subtitle is displayed.
|