couds / react-bulma-components

React components for Bulma framework
MIT License
1.2k stars 126 forks source link

NavBar Burger not opening Nav #327

Closed luhis closed 3 years ago

luhis commented 3 years ago

Describe the bug I cannot see how to make the Burger Nav work on small screens

To Reproduce https://couds.github.io/react-bulma-components/?path=/story/components-navbar--default Go to the NavBar component Make screen width small, NavBar will show Burger, but clicking does nothing.

Expected behavior It should show the menu items

Additional context This may just be an issue in the docs, but I cannot see how to make the menu work as it used to.

couds commented 3 years ago

Hi @luhis The menu is a controlled component, does not automatically open on click on the burger. to open the menu you need to pass the active prop to the navbar.

The sate will be managed by your code. so probably you need to also add a onClick to the burger to handle that state

couds commented 3 years ago

Closing this.