mirror of
https://github.com/Mastermindzh/react-cookie-consent.git
synced 2025-05-10 07:13:47 +02:00
Compare commits
2 Commits
7136086602
...
9a0c974b2a
Author | SHA1 | Date | |
---|---|---|---|
9a0c974b2a | |||
c2f92ec130 |
@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
|
|||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [[6.4.1](https://github.com/Mastermindzh/react-cookie-consent/releases/tag/6.4.1))]
|
||||||
|
|
||||||
|
- Added missing typing
|
||||||
|
|
||||||
|
## [[6.4.0](https://github.com/Mastermindzh/react-cookie-consent/releases/tag/6.4.0))]
|
||||||
|
|
||||||
|
- Added visible prop
|
||||||
|
|
||||||
## [[6.3.0](https://github.com/Mastermindzh/react-cookie-consent/releases/tag/6.2.3))]
|
## [[6.3.0](https://github.com/Mastermindzh/react-cookie-consent/releases/tag/6.2.3))]
|
||||||
|
|
||||||
- Added the (optional) scrolling effect back in as it is declared legal in some countries now.
|
- Added the (optional) scrolling effect back in as it is declared legal in some countries now.
|
||||||
|
14
build/index.d.ts
vendored
14
build/index.d.ts
vendored
@ -4,6 +4,7 @@ import Cookies from "js-cookie";
|
|||||||
export interface CookieConsentProps {
|
export interface CookieConsentProps {
|
||||||
location?: "top" | "bottom" | "none";
|
location?: "top" | "bottom" | "none";
|
||||||
sameSite?: "strict" | "lax" | "none";
|
sameSite?: "strict" | "lax" | "none";
|
||||||
|
visible?: "hidden" | "show" | "byCookieValue";
|
||||||
cookieSecurity?: boolean;
|
cookieSecurity?: boolean;
|
||||||
style?: object;
|
style?: object;
|
||||||
buttonStyle?: object;
|
buttonStyle?: object;
|
||||||
@ -53,4 +54,17 @@ export default class CookieConsent extends React.Component<CookieConsentProps, {
|
|||||||
*/
|
*/
|
||||||
export function getCookieConsentValue(name?: string): string;
|
export function getCookieConsentValue(name?: string): string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reset the consent cookie
|
||||||
|
* Remove the cookie on browser in order to allow user to change their consent
|
||||||
|
* @param {*} name optional name of the cookie
|
||||||
|
*/
|
||||||
|
export function resetCookieConsentValue(name?: string);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the legacy cookie name by the regular cookie name
|
||||||
|
* @param {string} name of cookie to get
|
||||||
|
*/
|
||||||
|
export function getLegacyCookieName(name: string);
|
||||||
|
|
||||||
export { Cookies };
|
export { Cookies };
|
||||||
|
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,11 +1,11 @@
|
|||||||
{
|
{
|
||||||
"name": "react-cookie-consent",
|
"name": "react-cookie-consent",
|
||||||
"version": "6.4.0",
|
"version": "6.4.1",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"version": "6.4.0",
|
"version": "6.4.1",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"js-cookie": "^2.2.1",
|
"js-cookie": "^2.2.1",
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"name": "Rick van Lieshout",
|
"name": "Rick van Lieshout",
|
||||||
"email": "info@rickvanlieshout.com"
|
"email": "info@rickvanlieshout.com"
|
||||||
},
|
},
|
||||||
"version": "6.4.0",
|
"version": "6.4.1",
|
||||||
"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",
|
||||||
"types": "build/index.d.ts",
|
"types": "build/index.d.ts",
|
||||||
|
14
src/index.d.ts
vendored
14
src/index.d.ts
vendored
@ -4,6 +4,7 @@ import Cookies from "js-cookie";
|
|||||||
export interface CookieConsentProps {
|
export interface CookieConsentProps {
|
||||||
location?: "top" | "bottom" | "none";
|
location?: "top" | "bottom" | "none";
|
||||||
sameSite?: "strict" | "lax" | "none";
|
sameSite?: "strict" | "lax" | "none";
|
||||||
|
visible?: "hidden" | "show" | "byCookieValue";
|
||||||
cookieSecurity?: boolean;
|
cookieSecurity?: boolean;
|
||||||
style?: object;
|
style?: object;
|
||||||
buttonStyle?: object;
|
buttonStyle?: object;
|
||||||
@ -53,4 +54,17 @@ export default class CookieConsent extends React.Component<CookieConsentProps, {
|
|||||||
*/
|
*/
|
||||||
export function getCookieConsentValue(name?: string): string;
|
export function getCookieConsentValue(name?: string): string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reset the consent cookie
|
||||||
|
* Remove the cookie on browser in order to allow user to change their consent
|
||||||
|
* @param {*} name optional name of the cookie
|
||||||
|
*/
|
||||||
|
export function resetCookieConsentValue(name?: string);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the legacy cookie name by the regular cookie name
|
||||||
|
* @param {string} name of cookie to get
|
||||||
|
*/
|
||||||
|
export function getLegacyCookieName(name: string);
|
||||||
|
|
||||||
export { Cookies };
|
export { Cookies };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user