Skip to content

[FloatingActionButton] Animate expanding Icon and apply IconStyle to EnhancedButton #1574

@TrySpace

Description

@TrySpace

I'm trying to expand the FloatingActionButton with style (height&width++) but when trying to do this for the inner element with iconStyle with the FontIcon it won't apply to the background (EnhancedButton), only the icon itself. And there will still be a floating smaller button in the FloatingActionButton

image

Even when not using FontIcon (which the documentation implies it would work on) but just a div, the EnhancedButton won't adhere to my overwrite styles:

image

Also, the TouchRipple doesn't seem to accept the new width:

image

What I'm trying to achieve here is animating the FloatingActionButton to a particular size, change the borderRadius to 0, then replacing it's content with some other element:

image

floatiy-expand

The animation works very nicely already, I just need to be freed from the restrictions of it always being a button.

In the end I think there should be two extra options like: expandStyle to apply to the enhancedButton (which wouldn't function as a button anymore) and the FloatingActionButton's Paper element to resize them uniformly on expand;
And an expandButton function or state true/false, or preferably both.
Or maybe make a seperate element like ExpandingFloatingActionButton to keep the code clean.

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: FabThe React component.type: new featureExpand the scope of the product to solve a new problem.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions