| .. | ||
| README.md | ||
AbbreviatedCard
使用 AbbreviatedCard 来显示一个简略卡片元素。
用法
import { Icon, box } from '@wordpress/icons';
<AbbreviatedCard
href="#"
icon={ <Icon icon={ page } /> }
onClick={ () => alert( 'Abbreviated card clicked' ) }
>
Content
</AbbreviatedCard>;
Props
| 名称 | 类型 | 默认值 | 描述 |
|---|---|---|---|
children |
ReactNode | null |
(必填) 简略卡片内部的子元素,在 component 中渲染 |
className |
字符串 | null |
额外的 CSS 类 |
href |
字符串 | null |
(必填) 要链接至的资源 |
icon |
Element | null |
(必填) 用于表示此卡片图标的元素 |
onClick |
Function | null |
点击时句柄,在组件被点击时调用 |
type |
字符串 | null |
链接类型 |