mirror of
				https://github.com/Mastermindzh/react-cookie-consent.git
				synced 2025-11-04 10:48:57 +01:00 
			
		
		
		
	@@ -7,7 +7,9 @@
 | 
			
		||||
  "version": "1.9.0",
 | 
			
		||||
  "description": "A small, simple and customizable cookie consent bar for use in React applications.",
 | 
			
		||||
  "main": "build/index.js",
 | 
			
		||||
  "types": "build/index.d.ts",
 | 
			
		||||
  "dependencies": {
 | 
			
		||||
    "copy-webpack-plugin": "^4.6.0",
 | 
			
		||||
    "js-cookie": "^2.2.0",
 | 
			
		||||
    "react": "^16.4.0"
 | 
			
		||||
  },
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										29
									
								
								src/index.d.ts
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								src/index.d.ts
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,29 @@
 | 
			
		||||
import * as React from 'react';
 | 
			
		||||
import Cookies from "js-cookie";
 | 
			
		||||
 | 
			
		||||
export interface CookieConsentProps {
 | 
			
		||||
  location?: "top" | "bottom" | "none",
 | 
			
		||||
  style?: object,
 | 
			
		||||
  buttonStyle?: object,
 | 
			
		||||
  contentStyle?: object,
 | 
			
		||||
  children?: React.ReactNode,
 | 
			
		||||
  disableStyles?: boolean,
 | 
			
		||||
  hideOnAccept?: boolean,
 | 
			
		||||
  onAccept?: Function,
 | 
			
		||||
  buttonText?: Function | React.ReactNode,
 | 
			
		||||
  cookieName?: string,
 | 
			
		||||
  cookieValue?: string | boolean | number,
 | 
			
		||||
  debug?: boolean,
 | 
			
		||||
  expires?: number,
 | 
			
		||||
  containerClasses?: string,
 | 
			
		||||
  contentClasses?: string,
 | 
			
		||||
  buttonClasses?: string,
 | 
			
		||||
  buttonId?: string,
 | 
			
		||||
  acceptOnScroll?: boolean,
 | 
			
		||||
  acceptOnScrollPercentage?: number,
 | 
			
		||||
  extraCookieOptions?: object
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export default class CookieConsent extends React.Component<CookieConsentProps, {}> {}
 | 
			
		||||
 | 
			
		||||
export { Cookies };
 | 
			
		||||
@@ -1,4 +1,6 @@
 | 
			
		||||
var path = require('path');
 | 
			
		||||
var CopyWebpackPlugin = require('copy-webpack-plugin');
 | 
			
		||||
 | 
			
		||||
module.exports = {
 | 
			
		||||
  entry: './src/index.js',
 | 
			
		||||
  output: {
 | 
			
		||||
@@ -23,5 +25,8 @@ module.exports = {
 | 
			
		||||
  },
 | 
			
		||||
  externals: {
 | 
			
		||||
    'react': 'commonjs react' // this line is just to use the React dependency of our parent-testing-project instead of using our own React.
 | 
			
		||||
  }
 | 
			
		||||
};
 | 
			
		||||
  },
 | 
			
		||||
  plugins: [
 | 
			
		||||
    new CopyWebpackPlugin([{ from: 'src/index.d.ts', to: 'index.d.ts' }])
 | 
			
		||||
  ]
 | 
			
		||||
};
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user