You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-1Lines changed: 20 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,6 +50,13 @@ return [
50
50
*/
51
51
'highlight_color' => null,
52
52
53
+
/**
54
+
* Floating banner toggle
55
+
* if false, the banner toggle will not be displayed.
56
+
* You need to add "data-cookie-solution-toggle" attribute to an element to open the banner.
57
+
*/
58
+
'toggle_enabled' => true,
59
+
53
60
/**
54
61
* Cookie toggle position (left or right).
55
62
*/
@@ -206,14 +213,26 @@ If you need a more advanced customization, you can edit the toggle position with
206
213
207
214
You can change the toggle z-index by changing the `--cs--toggle-z-index` CSS variable. The default value is `9999`.
208
215
216
+
#### Disabling toggle
217
+
218
+
Sometimes you may want to disable the default floating toggle and use your own toggle button.
219
+
You can do this by setting the `toggle_enabled` config value to `false`.
220
+
Then you need to add the `data-cookie-solution-toggle` attribute to an element in your layout, like this:
221
+
222
+
```html
223
+
<buttondata-cookie-solution-toggle>
224
+
Toggle Cookie Banner
225
+
</button>
226
+
```
227
+
209
228
#### Views
210
229
211
230
If you want to customize the views, you can publish them with `php artisan vendor:publish --tag="cookie-solution-views"` and style them however you like.
212
231
The `<cookie-solution-policy-formatter/>` custom component is used to apply the default styles, you can safely remove it to customize the views.
213
232
214
233
## Checking status
215
234
216
-
You can check the user's consent status from laravel using the `CookieSolution::status()` method,
235
+
You can check the user's consent status from laravel using the `CookieSolution::status()` method,
217
236
which returns a `CookieSolutionStatus` object with helpers to check if a purpose has been accepted.
0 commit comments