index.js 540 Bytes
Newer Older
jiang's avatar
jiang committed
1
import 'rc-drawer-menu/assets/index.css';
2
import React from 'react';
jiang's avatar
jiang committed
3 4
import DrawerMenu from 'rc-drawer-menu';
import SiderMenu from './SiderMenu';
偏右's avatar
偏右 committed
5

6
export default props => (
jim's avatar
jim committed
7
  props.isMobile || props.fixSiderbar ? (
8 9 10 11 12 13 14 15 16 17 18 19
    <DrawerMenu
      parent={null}
      level={null}
      iconChild={null}
      open={!props.collapsed}
      onMaskClick={() => { props.onCollapse(true); }}
      width="256px"
    >
      <SiderMenu {...props} collapsed={props.isMobile ? false : props.collapsed} />
    </DrawerMenu>
  ) : <SiderMenu {...props} />
);