-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
42a903a
commit fd2b4ab
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Upgrading from 2.x to 3.x | ||
|
||
### Change styles path | ||
Styles are moved outside of the src directory so these can be excluded. | ||
|
||
`@import '~@freshheads/cookie-guard/src/scss/popup';` | ||
|
||
becomes: | ||
|
||
`@import '~@freshheads/cookie-guard/styles/popup';` | ||
|
||
### No longer use src directory | ||
The src is now typescript, which is no longer published. Use the build by importing `@freshheads/cookie-guard` | ||
This is an ES5 build, but we will soon publish an ES2015 build as well. | ||
|
||
### Removed onRevoke callback and selector | ||
The same can be accomplished by making your own selector and calling the cookieConsentStore. | ||
|
||
``` | ||
revokeButton.addEventListener('click', () => { | ||
cookieGuard.cookieConsentStore.revoke(); | ||
window.location.reload(); | ||
}); | ||
``` | ||
|
||
But we recommend no longer using revoke but offer users the ability to change their choice by calling accept or refuse on the cookie consent store. | ||
|
||
`cookieGuard.cookieConsentStore.accept();` | ||
|
||
`cookieGuard.cookieConsentStore.refuse();` | ||
|
||
|
||
### Renames of some config parameters | ||
|
||
Check the new config for the correct naming |