saas-ui
saas-ui copied to clipboard
Sidebar: Toggle Icon not changing when in responsive sidebar mode
Hi! Thanks for open sourcing the app-shell and sidebar components. I previously wrote my own version which was really messy so i replaced them with the first party counterparts.
When trying out responsive sidebar, noticed that the icon for <SidebarToggleButton />
remains HamburgerIcon
even after the sidebar is toggled to 'open' on mobile.
This is by design currently. But a little more custimization would be a good idea I suppose.
<SidebarToggleButton icon={({isOpen}) => isOpen? <CloseIcon /> : <HamburgerIcon>} />
Could be a solution.
This is by design currently. But a little more custimization would be a good idea I suppose.
<SidebarToggleButton icon={({isOpen}) => isOpen? <CloseIcon /> : <HamburgerIcon>} />
Could be a solution.
That'd be great. This will allow users to set their own custom icons and the default <HamburgerIcon>
will be used if no icon
prop has been set.
I think a notice should be put out there in the docs when it's implemented.
Released in 0.1.2
Thanks for the feedback!
Released in 0.1.2
Thanks for the feedback!
You're welcome. It works like a charm.