mirror of
https://github.com/Mastermindzh/react-cookie-consent.git
synced 2025-08-23 09:35:04 +02:00
Add TypeScript Definition
Add a TypeScript Definition, and "build" it with webpack to the build folder. This will add correct typings, if you use TypeScript with React. #27
This commit is contained in:
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 ICookieConcentProps {
|
||||
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 CookieConcent extends React.Component<ICookieConcentProps, {}> {}
|
||||
|
||||
export { Cookies };
|
Reference in New Issue
Block a user