react-tiny-fab icon indicating copy to clipboard operation
react-tiny-fab copied to clipboard

Allow custom main button

Open didier-demange opened this issue 4 years ago • 3 comments

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 : image

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?

didier-demange avatar Dec 14 '20 10:12 didier-demange

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 !

didier-demange avatar Dec 14 '20 10:12 didier-demange

Any way to diable the rotation?

ivanjeremic avatar Sep 27 '21 09:09 ivanjeremic

you can add this to css file .rtf.open .rtf--mb > * { transform: rotate(0deg) !important; }

180107067 avatar Feb 18 '22 08:02 180107067