mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-24 07:28:28 +08:00
28 lines
558 B
Markdown
28 lines
558 B
Markdown
---
|
|
order: 0
|
|
title:
|
|
zh-CN: 按钮类型
|
|
en-US: Type
|
|
---
|
|
|
|
## zh-CN
|
|
|
|
按钮有四种类型:主按钮、次按钮、虚线按钮、危险按钮。主按钮在同一个操作区域最多出现一次。
|
|
|
|
## en-US
|
|
|
|
There are `primary` button, `default` button, `dashed` button and `danger` button in antd.
|
|
|
|
````jsx
|
|
import { Button } from 'antd';
|
|
|
|
ReactDOM.render(
|
|
<div>
|
|
<Button type="primary">Primary</Button>
|
|
<Button>Default</Button>
|
|
<Button type="dashed">Dashed</Button>
|
|
<Button type="danger">Danger</Button>
|
|
</div>,
|
|
mountNode);
|
|
````
|