Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QUESTION] Is it possible to make ripple effect overflow its container? #22

Open
LeonardoBurrone opened this issue Feb 18, 2019 · 2 comments

Comments

@LeonardoBurrone
Copy link

Hi,
I'd like to know if it's possible to make the ripple effect overflow beyond its container so I always get a circular effect instead a square when ripple effect ends on its container.

Thank you.

@roguealexander
Copy link

I'd also like to say this would be very valuable, especially for situations where an Icon is being pressed. Love the package.

@roguealexander
Copy link

So turns out this is exceedingly easy to implement, you just need to add 4 lines to index.js

This creates a prop named rippleOverflow, add these lines in order:
On line 15: rippleOverflow: false,
On line 33: rippleOverflow: PropTypes.bool,
On line 212: rippleOverflow,
On line 241: overflow: rippleOverflow ? 'visible' : 'hidden'

This last line is the one that enables the overflow, the rest is just prop stuff.
I would recommend if you do this to also add rippleCentered to any components you add this to, the ripple can get pretty large otherwise if clicked near the edge based on how the ripple is implemented.

Good luck @LeonardoBurrone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants