mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-02 15:59:38 +08:00
1.2 KiB
1.2 KiB
order | title | ||||
---|---|---|---|---|---|
0 |
|
zh-CN
按钮有四种类型:主按钮、次按钮、幽灵按钮、虚线按钮。
通过设置 type
为 primary
ghost
dashed
可分别创建主按钮、幽灵按钮、虚线按钮,若不设置 type
值则为次按钮。不同的样式可以用来区别其重要程度。
主按钮和次按钮可独立使用,幽灵按钮用于和主按钮组合。需要强引导用主按钮,切记主按钮在同一个操作区域最多出现一次。
en-US
There are primary button, default button, ghost button and dashed button in antd.
type
can be set as primary
or ghost
or dashed
, in order to create primary button or ghost button or dashed button. If nothing is provided to type
, we will get default button. Users can tell the significance of button from it's appearance.
Primary button and default button can be used without other button, but ghost button must be used with primary button.
import { Button } from 'antd';
ReactDOM.render(
<div>
<Button type="primary">Primary</Button>
<Button>Default</Button>
<Button type="ghost">Ghost</Button>
<Button type="dashed">Dashed</Button>
</div>
, mountNode);