zksailor534 / react-adminlte-dash

This project is No Longer Maintained. React implementation of AdminLTE themed dashboard
http://zksailor534.github.io/react-adminlte-dash/
MIT License
167 stars 35 forks source link

toggling programmatically #9

Open m2jobe opened 7 years ago

m2jobe commented 7 years ago

Is there a way to toggle programmatically in the event you want to place the toggle button elsewhere

zksailor534 commented 7 years ago

Sorry I took so long to get back to you. It is possible to toggle programmatically, but not using the Dashboard component. The Dashboard component is just a wrapper around the other elements. The Header component has a sidebarCollapse prop that determines the toggled state and a sidebarToggle prop that determines what action the existing toggle performs. These components could be used separately from Dashboard to create exactly what you want. See src/components/Dashboard.js to learn how those components fit together.