标题
The Title
块用作文档条目的主标题。通常用于提供组件或页面的名称。
import { Title } from '@storybook/addon-docs/blocks';
<Title>This is the title</Title>
标题
import { Title } from '@storybook/addon-docs/blocks';
Title
可以配置以下 props
children
类型:JSX.Element | string
提供内容。在关联的 CSF 文件中,如果未提供内容,则会回退到 title
的值(或从自动标题派生的值),并截取最后一个片段。例如,如果 title 的值为 'path/to/components/Button'
,则默认内容为 'Button'
。
of
类型:CSF 文件导出
指定显示哪个 meta 的标题。