@schlomoh/react-cookieconsent
Advanced tools
Comparing version
{ | ||
"name": "@schlomoh/react-cookieconsent", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "cookie banner written in typescript and react", | ||
"main": "_babelOut/index.js", | ||
"type": "module", | ||
"types": "_babelOut/index.d.ts", | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"files": [ | ||
"_babelOut", | ||
"dist", | ||
"README.md" | ||
@@ -17,6 +16,6 @@ ], | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"start": "webpack serve", | ||
"transpile": "babel src/react-cookieConsent -d _babelOut --copy-files --extensions '.tsx'", | ||
"serve": "webpack serve", | ||
"transpile": "rm -rfd _babelOut && babel src/reactCookieConsent -d _babelOut --copy-files --extensions '.tsx'", | ||
"typecheck": "rm -rfd _tsOut && tsc", | ||
"build": "rm -rfd _babelOut/ && mkdir _babelOut && npm run typecheck && mv _tsOut/react-cookieConsent/* _babelOut && rm -rfd _tsOut && npm run transpile", | ||
"build": "rm -rfd dist && mkdir dist && npm run typecheck && npm run transpile && mv _tsOut/reactCookieConsent/* dist && mv _babelOut/* dist && rm -rfd _babelOut _tsOut", | ||
"prepublishOnly": "npm run build" | ||
@@ -38,5 +37,6 @@ }, | ||
"babel-loader": "^8.2.4", | ||
"babel-preset-minify": "^0.5.1", | ||
"css-loader": "^6.7.1", | ||
"eslint-plugin-react-hooks": "^4.3.0", | ||
"html-webpack-plugin": "^5.5.0", | ||
"ts-loader": "^9.2.8", | ||
"typescript": "^4.6.3", | ||
@@ -60,5 +60,10 @@ "webpack": "^5.70.0", | ||
"cookie-banner", | ||
"consent" | ||
"cookie-consent", | ||
"cookie-modal", | ||
"consent-modal", | ||
"customizable", | ||
"typescript", | ||
"react-cookie" | ||
], | ||
"browserslist": "> 0.25%, not dead" | ||
} |
@@ -1,1 +0,24 @@ | ||
# cookieConsent | ||
# cookieConsent | ||
## This cookie consent react component aims to provide a fully customizable banner or modal to be displayed once your site is visited | ||
##### Currently the modal is the only available type. | ||
# | ||
## Usage | ||
``` | ||
import {CookieConsent} from '@schlomoh/react-cookieConsent' | ||
const MyApp = () => ( | ||
<> | ||
<CookieConsent type='modal'> | ||
<MyPage /> | ||
</> | ||
) | ||
``` | ||
You can choose to give the option of customizing cookie preferences by enabling the 'managementView' by setting the property ```enableManagement = {true}```. | ||
### Example | ||
 |
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 2 instances in 1 package
10814
189.76%7
16.67%48
29.73%25
2400%19
5.56%3
200%No
NaN