mirror of
https://github.com/Mastermindzh/react-cookie-consent.git
synced 2025-01-20 18:41:44 +01:00
version bump and build
This commit is contained in:
parent
c5a2632ea3
commit
e6120e4f24
@ -632,6 +632,7 @@ var CookieConsent = function (_Component) {
|
|||||||
value: function accept() {
|
value: function accept() {
|
||||||
var _props2 = this.props,
|
var _props2 = this.props,
|
||||||
cookieName = _props2.cookieName,
|
cookieName = _props2.cookieName,
|
||||||
|
cookieValue = _props2.cookieValue,
|
||||||
expires = _props2.expires,
|
expires = _props2.expires,
|
||||||
hideOnAccept = _props2.hideOnAccept,
|
hideOnAccept = _props2.hideOnAccept,
|
||||||
onAccept = _props2.onAccept,
|
onAccept = _props2.onAccept,
|
||||||
@ -643,7 +644,7 @@ var CookieConsent = function (_Component) {
|
|||||||
// remove listener if set
|
// remove listener if set
|
||||||
window.removeEventListener("scroll", this.handleScroll);
|
window.removeEventListener("scroll", this.handleScroll);
|
||||||
|
|
||||||
_jsCookie2.default.set(cookieName, true, _extends({ expires: expires }, extraCookieOptions));
|
_jsCookie2.default.set(cookieName, cookieValue, _extends({ expires: expires }, extraCookieOptions));
|
||||||
|
|
||||||
if (hideOnAccept) {
|
if (hideOnAccept) {
|
||||||
this.setState({ visible: false });
|
this.setState({ visible: false });
|
||||||
@ -739,6 +740,7 @@ CookieConsent.propTypes = {
|
|||||||
onAccept: _propTypes2.default.func,
|
onAccept: _propTypes2.default.func,
|
||||||
buttonText: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.func, _propTypes2.default.element]),
|
buttonText: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.func, _propTypes2.default.element]),
|
||||||
cookieName: _propTypes2.default.string,
|
cookieName: _propTypes2.default.string,
|
||||||
|
cookieValue: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.bool, _propTypes2.default.number]),
|
||||||
debug: _propTypes2.default.bool,
|
debug: _propTypes2.default.bool,
|
||||||
expires: _propTypes2.default.number,
|
expires: _propTypes2.default.number,
|
||||||
containerClasses: _propTypes2.default.string,
|
containerClasses: _propTypes2.default.string,
|
||||||
@ -757,6 +759,7 @@ CookieConsent.defaultProps = {
|
|||||||
location: OPTIONS.BOTTOM,
|
location: OPTIONS.BOTTOM,
|
||||||
onAccept: function onAccept() {},
|
onAccept: function onAccept() {},
|
||||||
cookieName: "CookieConsent",
|
cookieName: "CookieConsent",
|
||||||
|
cookieValue: true,
|
||||||
buttonText: "I understand",
|
buttonText: "I understand",
|
||||||
debug: false,
|
debug: false,
|
||||||
expires: 365,
|
expires: 365,
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"name": "Rick van Lieshout",
|
"name": "Rick van Lieshout",
|
||||||
"email": "info@rickvanlieshout.com"
|
"email": "info@rickvanlieshout.com"
|
||||||
},
|
},
|
||||||
"version": "1.7.0",
|
"version": "1.8.0",
|
||||||
"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": {
|
||||||
|
Loading…
Reference in New Issue
Block a user