Tidied the readme and bumped the version (I want the readme to reflect on npm.js)

This commit is contained in:
Rick van Lieshout 2018-05-22 10:07:41 +02:00
parent cda5a1390c
commit b40e699a93
2 changed files with 6 additions and 6 deletions

View File

@ -57,7 +57,7 @@ You can optionally set some props like this (next chapter will show all props):
</CookieConsent> </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 ```js
<CookieConsent <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 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. 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> </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 ```js
// import CookieConsent, { Cookies } from "react-cookie-consent"; import CookieConsent, { Cookies } from "react-cookie-consent";
{Cookies.remove("myAwesomeCookieName2")} {Cookies.remove("myAwesomeCookieName2")}
<CookieConsent <CookieConsent

View File

@ -4,7 +4,7 @@
"name": "Rick van Lieshout", "name": "Rick van Lieshout",
"email": "info@rickvanlieshout.com" "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.", "description": "A small, simple and customizable cookie consent bar for use in React applications.",
"main": "build/index.js", "main": "build/index.js",
"dependencies": { "dependencies": {