trendmicro-frontend / react-sidenav

React SideNav component
https://trendmicro-frontend.github.io/react-sidenav/
MIT License
349 stars 104 forks source link

SubMenu #19

Open alex-dgx opened 5 years ago

alex-dgx commented 5 years ago

Hi, I can't find a solution for this problem issued in Issue#13

https://github.com/trendmicro-frontend/react-sidenav/issues/13

Can somebody help me?

roth1002 commented 5 years ago

Try render props as you want

const SideNavWrapper = (props) => {
    return (typeof children === 'function') ? children({ ...props }) : children;
};
abhishekmittalmsc commented 4 years ago

Can you please share any exmaple for... const SideNavWrapper = (props) => { return (typeof children === 'function') ? children({ ...props }) : children;