How to connect Navbar toggle to Sidebar in Flowbite React components. #176
-
Hello, I'm having great luck integrating this library, thank you for creating it. I think I'm missing something obvious, but I'm struggling to connect the Navbar.Toggle component to the Sidebar's collapsed state. Navbar.Toggle doesn't seem to export any event handlers, and the context for Navbar toggle is private. Is there an easy way to toggle the sidebar's collased state when the navbar.toggle is opened or closed? Thanks! Nathan |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hey @PlasticLizard, I think it would be best if you opened an issue here: https://github.com/themesberg/flowbite-react Cheers! |
Beta Was this translation helpful? Give feedback.
-
I solved it by creating a hidden button with data-drawer-toggle tag and clicking it by javascript from ts, in my case after being triggered by navigation subscription |
Beta Was this translation helpful? Give feedback.
Hey @PlasticLizard,
I think it would be best if you opened an issue here: https://github.com/themesberg/flowbite-react
Cheers!