1.0.2 • Published 2 years ago

react-cookie-gpdr v1.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

react-cookie-gpdr

🍪 Beautiful and customizable react cookie consent widget for your applications

License: MIT Donate

enter image description here


:cloud: Installation

npm install react-cookie-gpdr

:raised_hands: Example

An example of the react-cookie-gpdr component is available here : Example of use

 <CookieWidget location="right"
               color={"#bb2030"}
               policyLink={"https://example.org"}
               title={"This website"}
               subtitle={"uses cookies"}
               text={"We use cookies and similar methods to recognize visitors and remember their preferences. We also use them to measure ad campaign effectiveness, target ads and analyze site traffic."}
               policyLinkText={"Read the privacy policy"}
               cookieSecurity={true}
               hideOnScrollDown={true}
               onAccept={() => alert('accepted')}
               onReject={() => alert('refused')}/>

:rocket: Props

PropsDescriptionDefault value
locationWidget position (bottom left or bottom right)"left"
colorColor scheme of the widget"#bb2030"
policyLinkURL of your policy Link/
policyLinkTextURL of your policy Link"Read the privacy policy"
titleWidget title"This website"
subtitleWidget subtitle"use Cookies"
textWidget text content"We use cookies and similar methods to recognize visitors and remember their preferences. We also use them to measure ad campaign effectiveness, target ads and analyze site traffic. To learn more about these methods, including how to disable them, view our Cookie Policy."
rejectButtonTextWidget reject button"Reject All"
acceptButtonTextWidget accept button"Accept All"
cookieSecurityCookie security (true if you use https)true
hideOnScrollDownAutomaticaly hide and accept on scroll downfalse
onAcceptOn Accept All functionvoid
onRejectOn Reject All functionvoid

:computer: Development

npm run storybook

This will start Storybook process.

To view the Storybook, go to http://localhost:6006 in your browser.

:mag_right: Credits

react-cookie-gpdr is a library of Clément de Louvencourt

Special thanks to:

  • Your name here ?