mirror of
https://github.com/wahyd4/ant-design.git
synced 2026-08-11 05:46:22 +10:00
801 B
801 B
order, title
| order | title |
|---|---|
| 0 | 按钮类型 |
按钮有三种类型:主按钮、次按钮、幽灵按钮。
通过设置 type 为 primary ghost 可分别创建主按钮、幽灵按钮,若不设置 type 值则为次按钮。不同的样式可以用来区别其重要程度。
主按钮和次按钮可独立使用,需要强引导用主按钮。幽灵按钮用于和主按钮组合。主按钮在同一个操作区域最多出现一次。
import { Button } from 'antd';
ReactDOM.render(<div>
<Button type="primary">主按钮</Button>
<Button>次按钮</Button>
<Button type="ghost">幽灵按钮</Button>
<Button type="dashed">虚线按钮</Button>
</div>, mountNode);