ant-design/components/button/demo/basic.md

32 lines
644 B
Markdown
Raw Normal View History

2016-03-31 09:40:55 +08:00
---
order: 0
2016-04-20 16:28:07 +08:00
title:
zh-CN: 按钮类型
en-US: Type
2016-03-31 09:40:55 +08:00
---
2016-04-20 16:28:07 +08:00
## zh-CN
按钮有四种类型:主按钮、次按钮、虚线按钮、危险按钮。主按钮在同一个操作区域最多出现一次。
2015-05-15 16:00:08 +08:00
> `danger` 在 `antd@2.7` 后支持。
2016-04-20 16:28:07 +08:00
## en-US
There are `primary` button, `default` button, `dashed` button and `danger` button in antd.
2016-04-20 16:28:07 +08:00
> `danger` is supported after `antd@2.7`.
2017-01-19 15:19:03 +08:00
````__react
import { Button } from 'antd';
2015-09-27 16:30:35 +08:00
2016-04-20 16:28:07 +08:00
ReactDOM.render(
<div>
<Button type="primary">Primary</Button>
<Button>Default</Button>
<Button type="dashed">Dashed</Button>
<Button type="danger">Danger</Button>
2016-11-13 18:19:23 +08:00
</div>
, mountNode);
2015-05-15 16:00:08 +08:00
````