用法
import { Placeholder } from '@wordpress/components';
import { more } from '@wordpress/icons';
const MyPlaceholder = () => <Placeholder icon={ more } label="占位符" />;
属性
className: string
设置在容器 div 上的类名。
- 必需:否
icon: string|Function|Component|null
如果提供,将在标签旁边渲染图标。
- 必需:否
instructions: string
占位符的说明。
- 必需:否
isColumnLayout: boolean
将占位符子元素的布局从 flex-row 更改为 flex-column。
- 必需:否
label: string
占位符的标题。
- 必需:否
notices: ReactNode
已渲染的通知列表
- 必需:否
preview: ReactNode
要在占位符中渲染的预览内容。
- 必需:否
withIllustration: boolean
输出占位符插图。
- 必需:否