React Cookie banner dismissable with just a scroll!
Name | Type | Default | Description |
---|---|---|---|
children | union(ReactChildren | Function) |
optional. Custom component rendered if user has not accepted cookies | |
message | String |
optional. Message written inside default cookie banner | |
onAccept | Function |
"onAccept" |
optional. Called when user accepts cookies |
link | JSX.Element |
optional. JSX element to link to your cookie-policy page | |
buttonMessage | String |
"Got it" |
optional. Message written inside the button of the default cookie banner |
cookie | String |
"accepts-cookies" |
optional. Cookie-key used to save user's decision about you cookie-policy |
cookieExpiration | union(Integer | {years: ?Number, days: ?Number, hours: ?Number}) |
{ "years": 1 } |
optional. Used to set the cookie expiration |
cookiePath | String |
optional. Used to set the cookie path | |
dismissOnScroll | Boolean |
true |
optional. Whether the cookie banner should be dismissed on scroll or not |
dismissOnScrollThreshold | Number |
0 |
optional. amount of pixel the user need to scroll to dismiss the cookie banner |
closeIcon | String |
optional. ClassName passed to close-icon | |
disableStyle | Boolean |
optional. Pass true if you want to disable default style |
|
styles | Object |
{} |
optional. Object with custom styles used to overwrite default ones |
className | String |
optional. Additional className for wrapper element |