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

40 lines
623 B
Markdown
Raw Normal View History

2020-01-03 15:22:16 +08:00
---
order: 9
title:
zh-CN: 危险按钮
en-US: Danger Buttons
---
## zh-CN
在 4.0 之后,危险成为一种按钮属性而不是按钮类型。
## en-US
`danger` is a property of button after antd 4.0.
```tsx
import React from 'react';
2020-01-03 15:22:16 +08:00
import { Button } from 'antd';
const App: React.FC = () => (
2020-01-03 15:22:16 +08:00
<>
<Button type="primary" danger>
Primary
</Button>
<Button danger>Default</Button>
<Button type="dashed" danger>
2020-05-26 09:37:26 +08:00
Dashed
2020-01-03 15:22:16 +08:00
</Button>
<Button type="text" danger>
Text
</Button>
2020-01-03 15:22:16 +08:00
<Button type="link" danger>
Link
2020-01-03 15:22:16 +08:00
</Button>
</>
2020-01-03 15:22:16 +08:00
);
export default App;
2020-01-03 15:22:16 +08:00
```