Improve Dropdown Button examples

This commit is contained in:
afc163 2016-09-13 18:27:39 +08:00
parent 0f986c07a2
commit d518e485b1
2 changed files with 19 additions and 9 deletions

View File

@ -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">
某功能按钮
</DropdownButton>
<div>
<Dropdown.Button onClick={handleButtonClick} overlay={menu} type="ghost">
某功能按钮
</Dropdown.Button>
<Dropdown overlay={menu}>
<Button type="ghost" style={{ marginLeft: 8 }}>
按钮 <Icon type="down" />
</Button>
</Dropdown>
</div>
, mountNode);
````

View File

@ -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);
}