side fold

This commit is contained in:
zuiidea
2016-11-29 22:06:35 +08:00
parent b781d9d4c8
commit 56f8ffe389
6 changed files with 28 additions and 15 deletions
+4
View File
@@ -5,6 +5,10 @@
height: 100vh;
min-width: 1200px;
&.fold{
color: #666;
}
.sider {
width: 224px;
background: #404040;
+7 -2
View File
@@ -26,14 +26,18 @@ const getMenus = function (menuArray, parentPath) {
})
}
function Sider({ location }) {
function Sider({ location,siderFold }) {
console.log(location,siderFold);
return (
<div>
<div className={styles.logo}>
<img src={config.logoSrc} />
<span>{config.logoText}</span>
</div>
<Menu mode="inline" theme="dark" defaultSelectedKeys={['dashboard']}>
<Menu
mode="inline"
theme="dark"
defaultSelectedKeys={['dashboard']}>
{getMenus(menu)}
</Menu>
</div>
@@ -42,6 +46,7 @@ function Sider({ location }) {
Sider.propTypes = {
location: PropTypes.object,
siderFold: PropTypes.bool,
}
export default Sider