buildo / react-cookie-banner

React Cookie banner which can be automatically dismissed with a scroll. Because fuck The Cookie Law, that's why.
http://react-components.buildo.io/#cookiebanner
MIT License
182 stars 19 forks source link

Add Click To Dismiss #51

Closed adamsandle closed 6 years ago

adamsandle commented 6 years ago

Closes #54

Here is a proposal to add click to dismiss functionality. If desired, the cookie banner would be dismissed by clicking anywhere on the banner.

This is to make the banner more easily dismissed when used on an app which is designed not to be scrollable as especially on mobile it can be harder to hit the dismiss button.

This functionality is not enabled by default to avoid any unexpected behavior on existing apps.

adamsandle commented 6 years ago

Only just realised this issue was tackled in https://github.com/buildo/react-cookie-banner/pull/28. What are your views being the implementation is slightly different?

adamsandle commented 6 years ago

Rebased against last commit. All tests are now passing

FrancescoCioria commented 6 years ago

Hi @adamsandle

As I pointed out in #28, after the refactor of #29 , this could be already done without a big effort, but as it seems like a common use case, I see no problem in adding this feature :)

Thank you for the PR ❤️

nemobot commented 6 years ago