1
0
Fork 0
mirror of https://github.com/archtechx/laravel-tips.git synced 2025-12-11 21:14:02 +00:00

Merge pull request #20 from archtechx/x-cloack-fix

Fix Alpine x-cloak not working for banner
This commit is contained in:
Samuel Štancl 2022-01-03 12:56:44 +01:00 committed by GitHub
commit 59205f1326
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,4 @@
<div class="z-50 fixed bottom-0 inset-x-0 pb-2 sm:pb-5" x-data="{ show: true, hide() { window.localStorage.show_banner = 'hide'; this.show = false } }" x-init="
<div x-cloak class="z-50 fixed bottom-0 inset-x-0 pb-2 sm:pb-5" x-data="{ show: true, hide() { window.localStorage.show_banner = 'hide'; this.show = false } }" x-init="
show = window.localStorage.show_banner !== 'hide'
" x-show="show">
<div class="max-w-screen-xl mx-auto px-2 sm:px-6 lg:px-8">