storybook/docs/api/doc-block-subtitle.md
2023-08-10 20:40:43 +01:00

36 lines
725 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.
![Screenshot of Subtitle block](./doc-block-title-subtitle-description.png)
<!-- 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.componentSubtitle`
Provides the content.