storybook/docs/api/doc-block-subtitle.md
2023-05-15 02:25:06 +01:00

40 lines
672 B
Markdown

---
title: 'Subtitle'
---
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:
### `of`
Type: CSF file exports
Specifies which meta's subtitle is displayed.
### `children`
Type: `JSX.Element | string`
Default: `parameters.docs.subtitle`
Provides the content.