release 6.0.0

This commit is contained in:
2020-11-02 19:43:03 +01:00
parent 86226dfbe3
commit c656e311e6
7 changed files with 658 additions and 2589 deletions

2
src/index.d.ts vendored
View File

@@ -12,7 +12,7 @@ export interface CookieConsentProps {
children?: React.ReactNode;
disableStyles?: boolean;
hideOnAccept?: boolean;
onAccept?: () => void;
onAccept?: Function;
onDecline?: Function;
buttonText?: Function | React.ReactNode;
declineButtonText?: Function | React.ReactNode;

View File

@@ -28,7 +28,6 @@ const ConditionalWrapper = ({ condition, wrapper, children }) => {
class CookieConsent extends Component {
constructor(props) {
super(props);
this.accept.bind(this);
this.state = {
visible: false,
@@ -281,7 +280,9 @@ class CookieConsent extends Component {
className={buttonClasses}
id={buttonId}
aria-label={ariaAcceptLabel}
onClick={this.accept}
onClick={() => {
this.accept();
}}
>
{buttonText}
</ButtonComponent>