Commit aaca87cc authored by yoyo837's avatar yoyo837 Committed by ι™ˆεΈ…

rc-drawer-menu is deprecated, use rc-drawer instead. Apply API change, fix iconHandle not work.

parent 566d4072
import 'rc-drawer-menu/assets/index.css'; import 'rc-drawer/assets/index.css';
import React from 'react'; import React from 'react';
import DrawerMenu from 'rc-drawer-menu'; import DrawerMenu from 'rc-drawer';
import SiderMenu from './SiderMenu'; import SiderMenu from './SiderMenu';
const SiderMenuWrapper = props => const SiderMenuWrapper = props =>
props.isMobile ? ( props.isMobile ? (
<DrawerMenu <DrawerMenu
parent={null} getContainer={null}
level={null} level={null}
iconChild={null} handleChild={<i className="drawer-handle-icon" />}
onHandleClick={() => {
props.onCollapse(!props.collapsed);
}}
open={!props.collapsed} open={!props.collapsed}
onMaskClick={() => { onMaskClick={() => {
props.onCollapse(true); props.onCollapse(true);
}} }}
width="256px"
> >
<SiderMenu {...props} collapsed={props.isMobile ? false : props.collapsed} /> <SiderMenu {...props} collapsed={props.isMobile ? false : props.collapsed} />
</DrawerMenu> </DrawerMenu>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment