beyonk-group / gdpr-cookie-consent-banner

A GDPR compliant cookie consent banner implementation
MIT License
252 stars 42 forks source link

React version? #11

Closed ilPas closed 1 year ago

ilPas commented 4 years ago

Is in roadmap? Or is there a possibility to use this awesome package with React?

Thanks a lot

antony commented 4 years ago

Hi @ilPas

You can use the package with React by following the Javascript instructions in the README. I'm afraid I don't use React so I can't give any more specific instructions.

ilPas commented 4 years ago

I try but i'm not expert, there is an error _beyonk_gdpr_cookie_consent_banner__WEBPACK_IMPORTED_MODULE_6___default(...) is not a function

antony commented 4 years ago

Sadly I'm not a React or Webpack user. From what you've listed there, it seems like your webpack configuration isn't quite correct, since the default export of the esm bundle is a function called attachBanner which is indeed a function.

Akiyamka commented 1 year ago

Example with react. https://codesandbox.io/p/sandbox/gifted-tess-jg7yo1

As I can understand this library just provide some ui for GDPR

Vibeesarma commented 1 year ago

is this work for astro.build?

antony commented 1 year ago

I've never tried, but yes, it should work with anything.