Skip to content

Commit

Permalink
The collapse trigger of Sider should be fixed and upon menus
Browse files Browse the repository at this point in the history
close #7161
  • Loading branch information
afc163 committed Aug 11, 2017
1 parent 30e4fa8 commit f689ede
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion components/layout/Sider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export default class Sider extends React.Component<SiderProps, any> {
const triggerDom = (
trigger !== null ?
zeroWidthTrigger || (
<div className={`${prefixCls}-trigger`} onClick={this.toggle}>
<div className={`${prefixCls}-trigger`} onClick={this.toggle} style={{ width: siderWidth }}>
{trigger || defaultTrigger}
</div>
) : null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -785,6 +785,7 @@ exports[`renders ./components/layout/demo/side.md correctly 1`] = `
</div>
<div
class="ant-layout-sider-trigger"
style="width:200px;"
>
<i
class="anticon anticon-left"
Expand Down
3 changes: 2 additions & 1 deletion components/layout/demo/side.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
order: 3
iframe: 360
title:
zh-CN: 侧边布局
en-US: Sider
Expand Down Expand Up @@ -65,7 +66,7 @@ class SiderDemo extends React.Component {
<Menu.Item key="6">Team 1</Menu.Item>
<Menu.Item key="8">Team 2</Menu.Item>
</SubMenu>
<Menu.Item key="8">
<Menu.Item key="9">
<Icon type="file" />
<span>File</span>
</Menu.Item>
Expand Down
6 changes: 3 additions & 3 deletions components/layout/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@
}

&-trigger {
position: absolute;
position: fixed;
text-align: center;
width: 100%;
bottom: 0;
cursor: pointer;
height: @layout-trigger-height;
line-height: @layout-trigger-height;
background: @layout-trigger-background;
color: @layout-trigger-color;
background: fade(@layout-trigger-background, 100);
z-index: 1;
}

&-zero-width {
Expand Down

0 comments on commit f689ede

Please sign in to comment.