mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-16 01:41:02 +08:00
c5bcf57537
* 🆕 Add text type Button `<Button type="text" />` close #15892 * Add test cases * missing type * missing type * fix missing type * Update components/button/index.zh-CN.md Co-Authored-By: zefeng <zefengbao@outlook.com> Co-authored-by: Amumu <yoyo837@hotmail.com> Co-authored-by: zefeng <zefengbao@outlook.com>
1.4 KiB
1.4 KiB
order | title | ||||
---|---|---|---|---|---|
3 |
|
zh-CN
添加 disabled
属性即可让按钮处于不可用状态,同时按钮样式也会改变。
en-US
To mark a button as disabled, add the disabled
property to the Button
.
import { Button } from 'antd';
ReactDOM.render(
<div>
<Button type="primary">Primary</Button>
<Button type="primary" disabled>
Primary(disabled)
</Button>
<br />
<Button>Default</Button>
<Button disabled>Default(disabled)</Button>
<br />
<Button type="dashed">Dashed</Button>
<Button type="dashed" disabled>
Dashed(disabled)
</Button>
<br />
<Button type="link">Link</Button>
<Button type="link" disabled>
Link(disabled)
</Button>
<br />
<Button type="text">Text</Button>
<Button type="text" disabled>
Text(disabled)
</Button>
<br />
<Button type="link" danger>
Danger Link
</Button>
<Button type="link" danger disabled>
Danger Link(disabled)
</Button>
<br />
<Button danger>Danger Default</Button>
<Button danger disabled>
Danger Default(disabled)
</Button>
<div className="site-button-ghost-wrapper">
<Button ghost>Ghost</Button>
<Button ghost disabled>
Ghost(disabled)
</Button>
</div>
</div>,
mountNode,
);
.site-button-ghost-wrapper {
padding: 8px 8px 0 8px;
background: rgb(190, 200, 200);
}