Closed govindsingh55 closed 4 years ago
@govindsingh55, I saw your implementation. Progressing good, the mode prop should be for MenuBar, not the SubMenu.
Now the SubMenu is Vertical and outside PopOver, but the MenuBarItems are still horizontal.
We need the MenuBarItems as-well in Vertical like this,
@govindsingh55, I saw your implementation. Progressing good, the mode prop should be for MenuBar, not the SubMenu.
add the flexDirection="column" to the MenuBar
Adding flexDirection="column" to the MenuBar should be done in the component based on the mode prop.
but will it contradict when the menubar is vertical one but we want the submenu to open in popper?
No that will not contradict that, default behavior on mode=vertical
makes menubar flexdirection column and the submenu still remains popper but the Popper placement
: right
.
Also, when isCollapsable
only on mode=vertical
, then instead of popper another component for the collapsed item will be rendered.
Understood?
I am not considering the navbar or hamburger case. In the case of side menubar, submenu can be a popover or collapsable container right?
yeah @govindsingh55 , even I am not considering the navbar.
Yes. in case of side menubar, submenu can be popover by default but on isCollapsable
it becomes a collapsable container.
That's correct.
so isCollapsable prop will decide to popper or collapsable container.
so isCollapsable prop will decide to popper or collapsable container.
Correct 💯
Great work Bro. Still missing the context and trigger code from [here](https://github.com/timelessco/chakra-components/blob/refractor-menubar/packages/chakra-components/src/MenuBar/SubMenu.js Kindly add that.
submenu mode vertical or horizontal added