mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-29 13:47:02 +08:00
css: align MainContent
This commit is contained in:
parent
ba9ec11079
commit
b022d79bd0
@ -11,9 +11,11 @@
|
||||
|
||||
.main-container {
|
||||
padding: 0 40px 120px;
|
||||
margin-left: -1px;
|
||||
background: #fff;
|
||||
min-height: 500px;
|
||||
overflow: hidden;
|
||||
border-left: 1px solid #e9e9e9;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
|
@ -113,22 +113,37 @@ export default class MainContent extends React.Component {
|
||||
const { prev, next } = this.getFooterNav(menuItems, activeMenuItem);
|
||||
|
||||
return (
|
||||
<Row className="main-wrapper">
|
||||
<Col span="4">
|
||||
<Menu className="sidebar" mode="inline"
|
||||
defaultOpenKeys={Object.keys(this.props.menuItems)}
|
||||
selectedKeys={[activeMenuItem]}>
|
||||
{ menuItems }
|
||||
</Menu>
|
||||
</Col>
|
||||
<Col span="20" className="main-container">
|
||||
{ this.props.children }
|
||||
<section className="prev-next-nav">
|
||||
{ !!prev ? React.cloneElement(prev.props.children, { className: 'prev-page' }) : null }
|
||||
{ !!next ? React.cloneElement(next.props.children, { className: 'next-page' }) : null }
|
||||
</section>
|
||||
</Col>
|
||||
</Row>
|
||||
<div className="main-wrapper">
|
||||
<Row>
|
||||
<Col span="4">
|
||||
<Menu className="sidebar" mode="inline"
|
||||
defaultOpenKeys={Object.keys(this.props.menuItems)}
|
||||
selectedKeys={[activeMenuItem]}>
|
||||
{ menuItems }
|
||||
</Menu>
|
||||
</Col>
|
||||
<Col span="20" className="main-container">
|
||||
{ this.props.children }
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
<Row>
|
||||
<Col span="20" offset="4">
|
||||
<section className="prev-next-nav">
|
||||
{
|
||||
!!prev ?
|
||||
React.cloneElement(prev.props.children, { className: 'prev-page' }) :
|
||||
null
|
||||
}
|
||||
{
|
||||
!!next ?
|
||||
React.cloneElement(next.props.children, { className: 'next-page' }) :
|
||||
null
|
||||
}
|
||||
</section>
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user