version bump and build

This commit is contained in:
Rick van Lieshout 2020-06-17 10:29:15 +02:00
parent 76ec5ba9e6
commit 6dbd794b6e
5 changed files with 2500 additions and 1982 deletions

View File

@ -5,6 +5,15 @@ 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/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [5.1.0]
A new feature! This time it's an "overlay" on the entire website to block access whilst the cookiebar is displayed.
This is all opt-in of course and the README covers it nicely (just add overlay to the props and see what happens).
We got an update picture, with a cute cat... unfortunately the cat won't be included by default:
![overlay example image](https://github.com/Mastermindzh/react-cookie-consent/blob/master/images/overlay.png?raw=true)
## [5.0.1]
- Fixed [Issue

3
build/index.d.ts vendored
View File

@ -35,6 +35,9 @@ export interface CookieConsentProps {
enableDeclineButton?: boolean;
flipButtons?: boolean;
ButtonComponent?: React.ElementType;
overlay?: boolean;
overlayClasses?: string;
overlayStyle?: object;
}
export default class CookieConsent extends React.Component<CookieConsentProps, {}> {}

File diff suppressed because it is too large Load Diff

View File

@ -4,7 +4,7 @@
"name": "Rick van Lieshout",
"email": "info@rickvanlieshout.com"
},
"version": "5.0.1",
"version": "5.1.0",
"description": "A small, simple and customizable cookie consent bar for use in React applications.",
"main": "build/index.js",
"types": "build/index.d.ts",

View File

@ -321,8 +321,8 @@ class CookieConsent extends Component {
}
const OverlayWrapper = !overlay
? props => <React.Fragment {...props} />
: props => <div {...props} />;
? (props) => <React.Fragment {...props} />
: (props) => <div {...props} />;
return (
<OverlayWrapper style={myOverlayStyle} className={overlayClasses}>
@ -331,7 +331,7 @@ class CookieConsent extends Component {
{this.props.children}
</div>
<div className={`${buttonWrapperClasses}`}>
{buttonsToRender.map(button => {
{buttonsToRender.map((button) => {
return button;
})}
</div>