mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 02:59:58 +08:00
feat: prevent horizontal menu items wrapping
This commit is contained in:
parent
125d0df3e0
commit
5c7f9feecb
@ -37,6 +37,7 @@ class App extends React.Component {
|
||||
onClick={this.handleClick}
|
||||
selectedKeys={[this.state.current]}
|
||||
mode="horizontal"
|
||||
triggerSubMenuAction="click"
|
||||
>
|
||||
<Menu.Item key="mail">
|
||||
<Icon type="mail" />Navigation One
|
||||
@ -44,7 +45,7 @@ class App extends React.Component {
|
||||
<Menu.Item key="app" disabled>
|
||||
<Icon type="appstore" />Navigation Two
|
||||
</Menu.Item>
|
||||
<SubMenu title={<span><Icon type="setting" />Navigation Three - Submenu</span>}>
|
||||
<SubMenu title={<span className="submenu-title-wrapper"><Icon type="setting" />Navigation Three - Submenu</span>}>
|
||||
<MenuItemGroup title="Item 1">
|
||||
<Menu.Item key="setting:1">Option 1</Menu.Item>
|
||||
<Menu.Item key="setting:2">Option 2</Menu.Item>
|
||||
|
@ -179,6 +179,10 @@
|
||||
position: absolute;
|
||||
border-radius: @border-radius-base;
|
||||
z-index: @zindex-dropdown;
|
||||
|
||||
.submenu-title-wrapper {
|
||||
padding-right: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
> .@{menu-prefix-cls} {
|
||||
@ -262,12 +266,13 @@
|
||||
border-bottom: @border-width-base @border-style-base @border-color-split;
|
||||
box-shadow: none;
|
||||
line-height: 46px;
|
||||
white-space: nowrap;
|
||||
|
||||
> .@{menu-prefix-cls}-item,
|
||||
> .@{menu-prefix-cls}-submenu {
|
||||
position: relative;
|
||||
top: 1px;
|
||||
float: left;
|
||||
display: inline-block;
|
||||
border-bottom: 2px solid transparent;
|
||||
|
||||
&:hover,
|
||||
|
Loading…
Reference in New Issue
Block a user