refactor: enhance onboarding modal functionality with live data binding and improved overflow handling for better user experience
This commit is contained in:
@@ -8,7 +8,17 @@
|
||||
</style>
|
||||
|
||||
<div class="onboarding-modal"
|
||||
x-data="{ open: @entangle('showModal'), currentSlide: @entangle('currentSlide') }"
|
||||
x-data="{
|
||||
open: @entangle('showModal').live,
|
||||
currentSlide: @entangle('currentSlide').live
|
||||
}"
|
||||
x-init="$watch('open', value => {
|
||||
if (value) {
|
||||
document.documentElement.style.overflow = 'hidden';
|
||||
} else {
|
||||
document.documentElement.style.overflow = '';
|
||||
}
|
||||
})"
|
||||
x-cloak>
|
||||
<div x-show="open"
|
||||
x-transition:enter="transition ease-out duration-300"
|
||||
|
||||
Reference in New Issue
Block a user