index.js 583 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

ZHAO Jinxiang's avatar
ZHAO Jinxiang committed
6
const SiderMenuWrapper = props =>
7 8 9 10 11 12
  props.isMobile ? (
    <DrawerMenu
      parent={null}
      level={null}
      iconChild={null}
      open={!props.collapsed}
jim's avatar
jim committed
13 14 15
      onMaskClick={() => {
        props.onCollapse(true);
      }}
16 17 18 19
      width="256px"
    >
      <SiderMenu {...props} collapsed={props.isMobile ? false : props.collapsed} />
    </DrawerMenu>
jim's avatar
jim committed
20 21 22
  ) : (
    <SiderMenu {...props} />
  );
ZHAO Jinxiang's avatar
ZHAO Jinxiang committed
23 24

export default SiderMenuWrapper;