You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

@schlomoh/react-cookieconsent

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@schlomoh/react-cookieconsent - npm Package Compare versions

Comparing version

to
1.0.5

dist/cookieConsent.d.ts

25

package.json
{
"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"
}

25

README.md

@@ -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
![example](https://github.com/schlomoh/cookieConsent/blob/main/doc-assets/cookieBannerExample.png?raw=true)