Skip to content

Commit e2d3fc2

Browse files
committed
allow to customize toggle z-index
1 parent 6ea9326 commit e2d3fc2

File tree

5 files changed

+8
-3
lines changed

5 files changed

+8
-3
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,10 @@ If you need a more advanced customization, you can edit the toggle position with
202202
}
203203
```
204204

205+
#### Toggle z-index
206+
207+
You can change the toggle z-index by changing the `--cs--toggle-z-index` CSS variable. The default value is `9999`.
208+
205209
#### Views
206210

207211
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.

resources/dist/laravel-cookie-solution.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

resources/dist/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"laravel-cookie-solution.js": "laravel-cookie-solution.js?id=4f4d82f7"
2+
"laravel-cookie-solution.js": "laravel-cookie-solution.js?id=d6850d9d"
33
}

resources/js/components/toggle.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export class CookieSolutionToggle extends LitElement {
2727
<div
2828
part="toggle-root"
2929
class="${clsx(
30-
'fixed bottom-toggle-bottom z-max print:hidden',
30+
'fixed bottom-toggle-bottom z-toggle print:hidden',
3131
this.position === 'left' ? 'left-toggle-x' : 'right-toggle-x',
3232
)}"
3333
>

tailwind.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ module.exports = {
1414
'toggle-x': 'var(--cs--toggle-position-x, 1rem)',
1515
},
1616
zIndex: {
17+
toggle: 'var(--cs--toggle-z-index, 9999)',
1718
max: '999999',
1819
},
1920
typography: ({ theme }) => ({

0 commit comments

Comments
 (0)