react-tiny-fab
react-tiny-fab copied to clipboard
Allow custom main button
Hi !
I currently use this awesome component with a "burger menu" icon, which does not look nice with the rotation. It ends up like this :

I would love to be able to replace the main button with another one (like this one 🤩 ).
If I use this as the icon for the Fab component, it rotates (which is ugly here) and cannot fire the menu opening/close on clic, and cannot be notified on menu opening.
This would imply that we could also :
- achieve the behavior asked in #53 by @ulsha, so that the custom button toggles the menu opening
- set a "menu opened" callback, so that we can trigger any custom button state
- disable icon rotation
What do you think of this?
Just for info, I can achieve nearly what I want by just setting the icon to the Hamburger component (strangely the click is handled by both the Hamburger and the Fab...), but the rotation (that cannot be canceled) still makes it ugly :-( Would be great if it could be disabled !
Any way to diable the rotation?
you can add this to css file .rtf.open .rtf--mb > * { transform: rotate(0deg) !important; }