mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-28 21:19:37 +08:00
Improve Dropdown Button examples
This commit is contained in:
parent
0f986c07a2
commit
d518e485b1
@ -6,8 +6,7 @@ title: 带下拉框的按钮
|
||||
左边是按钮,右边是额外的相关功能菜单。
|
||||
|
||||
````jsx
|
||||
import { Menu, Dropdown } from 'antd';
|
||||
const DropdownButton = Dropdown.Button;
|
||||
import { Menu, Dropdown, Button, Icon } from 'antd';
|
||||
|
||||
function handleButtonClick(e) {
|
||||
console.log('click left button', e);
|
||||
@ -26,8 +25,15 @@ const menu = (
|
||||
);
|
||||
|
||||
ReactDOM.render(
|
||||
<DropdownButton onClick={handleButtonClick} overlay={menu} type="primary">
|
||||
<div>
|
||||
<Dropdown.Button onClick={handleButtonClick} overlay={menu} type="ghost">
|
||||
某功能按钮
|
||||
</DropdownButton>
|
||||
</Dropdown.Button>
|
||||
<Dropdown overlay={menu}>
|
||||
<Button type="ghost" style={{ marginLeft: 8 }}>
|
||||
按钮 <Icon type="down" />
|
||||
</Button>
|
||||
</Dropdown>
|
||||
</div>
|
||||
, mountNode);
|
||||
````
|
||||
|
@ -17,7 +17,7 @@
|
||||
position: relative;
|
||||
|
||||
.ant-btn > .@{iconfont-css-prefix}-down {
|
||||
.iconfont-size-under-12px(10px);
|
||||
.iconfont-size-under-12px(9px);
|
||||
}
|
||||
|
||||
.anticon-down:before {
|
||||
@ -110,7 +110,7 @@
|
||||
content: "\e600";
|
||||
right: 15px;
|
||||
color: #999;
|
||||
.iconfont-size-under-12px(8px);
|
||||
.iconfont-size-under-12px(9px);
|
||||
}
|
||||
|
||||
&-submenu-vertical {
|
||||
@ -157,7 +157,7 @@
|
||||
.@{dropdown-prefix-cls}-link {
|
||||
font-size: 12px;
|
||||
.anticon-down {
|
||||
.iconfont-size-under-12px(8px);
|
||||
.iconfont-size-under-12px(9px);
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
@ -167,6 +167,10 @@
|
||||
padding-right: 7px;
|
||||
}
|
||||
.anticon-down {
|
||||
.iconfont-size-under-12px(10px);
|
||||
.iconfont-size-under-12px(9px);
|
||||
}
|
||||
}
|
||||
|
||||
.ant-btn .anticon-down {
|
||||
.iconfont-size-under-12px(9px);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user