mirror of
https://github.com/Mastermindzh/react-cookie-consent.git
synced 2025-01-20 18:41:44 +01:00
Tidied the readme and bumped the version (I want the readme to reflect on npm.js)
This commit is contained in:
parent
cda5a1390c
commit
b40e699a93
10
README.md
10
README.md
@ -57,7 +57,7 @@ You can optionally set some props like this (next chapter will show all props):
|
||||
</CookieConsent>
|
||||
```
|
||||
|
||||
On of the props (onAccept) is a function, this function will be called after the user has clicked the accept button. You can provide a function like so:
|
||||
One of the props (onAccept) is a function, this function will be called after the user has clicked the accept button. You can provide a function like so:
|
||||
|
||||
```js
|
||||
<CookieConsent
|
||||
@ -81,7 +81,7 @@ On of the props (onAccept) is a function, this function will be called after the
|
||||
|
||||
|
||||
|
||||
## styling it
|
||||
## Styling it
|
||||
|
||||
You can provide styling for both the bar and the button.
|
||||
You can do this using the `style` and `buttonStyle` prop, both of these will append / replace the default style of the component.
|
||||
@ -127,12 +127,12 @@ If you're crazy enough you can even make a rainbow colored bar:
|
||||
</CookieConsent>
|
||||
```
|
||||
|
||||
## debugging it
|
||||
## Debugging it
|
||||
|
||||
Because the cookie consent bar is only shown the first time, you need to remove the cookie, if you want to evaluate changes:
|
||||
Because the cookie consent bar will be hidden once accepted, you will have to remove the cookie if you want to evaluate changes:
|
||||
|
||||
```js
|
||||
// import CookieConsent, { Cookies } from "react-cookie-consent";
|
||||
import CookieConsent, { Cookies } from "react-cookie-consent";
|
||||
|
||||
{Cookies.remove("myAwesomeCookieName2")}
|
||||
<CookieConsent
|
||||
|
@ -4,7 +4,7 @@
|
||||
"name": "Rick van Lieshout",
|
||||
"email": "info@rickvanlieshout.com"
|
||||
},
|
||||
"version": "1.0.7",
|
||||
"version": "1.0.8",
|
||||
"description": "A small, simple and customizable cookie consent bar for use in React applications.",
|
||||
"main": "build/index.js",
|
||||
"dependencies": {
|
||||
|
Loading…
Reference in New Issue
Block a user