Package Exports
- deku-cookies
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (deku-cookies) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
deku-cookies
Simple cookie warning component for Deku
Accordning to the law in Europe the visitor of a website using cookies should get information about this and has to give their consent.
Install
$ npm install --save deku-cookiesUsage
import Cookies from 'deku-cookies';
export function render() {
const content = <div>We are using cookies, do you accept?</div>;
return (
<Cookies button='Accept' content={content}/>
);
}Attributes
button
Type: element or string
Content to be shown as button. If a string is sent in, a button will be built automatically.
class
Type: string
Default: Cookies
Class to be added to the element.
content
Type: element or string
Content to be shown in the component.
isAccepted
Type: function
Function that runs on afterMount and returns a boolean.
maxage
Type: number
Default: 7889238000
Time before the cookie is removed. Default is around 3 months.
onClick
Type: function
Function that runs on button click.
License
MIT © Andreas Gillström