saas-ui icon indicating copy to clipboard operation
saas-ui copied to clipboard

Sidebar: Toggle Icon not changing when in responsive sidebar mode

Open waptik opened this issue 1 year ago • 2 comments

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.

waptik avatar Sep 20 '22 14:09 waptik

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.

Pagebakers avatar Sep 20 '22 18:09 Pagebakers

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.

waptik avatar Sep 21 '22 07:09 waptik

Released in 0.1.2

Thanks for the feedback!

Pagebakers avatar Sep 25 '22 09:09 Pagebakers

Released in 0.1.2

Thanks for the feedback!

You're welcome. It works like a charm.

waptik avatar Sep 26 '22 20:09 waptik