mirror of
https://github.com/Mastermindzh/react-cookie-consent.git
synced 2025-09-18 14:19:37 +02:00
added buttonFlipping
This commit is contained in:
17
README.md
17
README.md
@@ -116,6 +116,7 @@ If the decline button is enabled then the (onDecline) prop function can be used,
|
||||
| contentStyle | object | [look at source][contentStyle] | React styling object for the content. |
|
||||
| disableButtonStyles | boolean | false | If enabled the button will have no default style. (you can still supply style through props) |
|
||||
| enableDeclineButton | boolean | false | If enabled the decline button will be rendered |
|
||||
| flipButtons | boolean | false | If enabled the accept and decline buttons will be flipped |
|
||||
| ButtonComponent | React component | button | React Component to render as a button.
|
||||
|
||||
## Debugging it
|
||||
@@ -199,6 +200,22 @@ You can make the cookiebar disappear after scrolling a certain percentage using
|
||||
</CookieConsent>
|
||||
```
|
||||
|
||||
#### Flipping the buttons
|
||||
If you enable the decline button you can pass along the "flipButtons" property to turn the button around:
|
||||
|
||||
```js
|
||||
<CookieConsent
|
||||
enableDeclineButton
|
||||
flipButtons
|
||||
>
|
||||
Flipped buttons
|
||||
</CookieConsent>
|
||||
```
|
||||
|
||||
Which results in:
|
||||
|
||||

|
||||
|
||||
#### Extra cookie options
|
||||
You can add more cookie options using the extraCookieOptions parameter like so:
|
||||
|
||||
|
Reference in New Issue
Block a user