fix:improve modal performance and useability
This commit is contained in:
@@ -7,14 +7,16 @@
|
|||||||
'persistent' => false
|
'persistent' => false
|
||||||
])
|
])
|
||||||
|
|
||||||
<dialog
|
<div>
|
||||||
|
@teleport('body')
|
||||||
|
<dialog
|
||||||
x-data="{ open: false }"
|
x-data="{ open: false }"
|
||||||
x-on:toggle-{{ $key }}.window="open = !open"
|
x-on:toggle-{{ $key }}.window="open = !open"
|
||||||
class="relative z-50 w-auto h-auto"
|
class="relative z-50 w-auto h-auto"
|
||||||
@if($closeOnEscape)
|
@if($closeOnEscape)
|
||||||
@keydown.window.escape="open = false"
|
@keydown.window.escape="open = false"
|
||||||
@endif
|
@endif
|
||||||
>
|
>
|
||||||
<template x-teleport="body">
|
<template x-teleport="body">
|
||||||
<div x-transition.opacity x-show="open" class="fixed top-0 left-0 z-[99] flex items-center justify-center w-full h-full">
|
<div x-transition.opacity x-show="open" class="fixed top-0 left-0 z-[99] flex items-center justify-center w-full h-full">
|
||||||
<div
|
<div
|
||||||
@@ -47,4 +49,6 @@
|
|||||||
</x-card>
|
</x-card>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</dialog>
|
</dialog>
|
||||||
|
@endteleport
|
||||||
|
</div>
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
<x-section-border class="my-3" />
|
<x-section-border class="my-3" />
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<div class="flex justify-between gap-3">
|
<div class="flex justify-end gap-3">
|
||||||
{{ $actions}}
|
{{ $actions}}
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|||||||
@@ -6,7 +6,9 @@
|
|||||||
'persistent' => false
|
'persistent' => false
|
||||||
])
|
])
|
||||||
|
|
||||||
<dialog
|
<div>
|
||||||
|
@teleport('body')
|
||||||
|
<dialog
|
||||||
{{ $attributes->except('wire:model')->class(["modal"]) }}
|
{{ $attributes->except('wire:model')->class(["modal"]) }}
|
||||||
x-data="{open: @entangle($attributes->wire('model')).live }"
|
x-data="{open: @entangle($attributes->wire('model')).live }"
|
||||||
:class="{'modal-open !animate-none': open}"
|
:class="{'modal-open !animate-none': open}"
|
||||||
@@ -14,7 +16,7 @@
|
|||||||
@if($closeOnEscape)
|
@if($closeOnEscape)
|
||||||
@keydown.escape.window = "$wire.{{ $attributes->wire('model')->value() }} = false"
|
@keydown.escape.window = "$wire.{{ $attributes->wire('model')->value() }} = false"
|
||||||
@endif
|
@endif
|
||||||
>
|
>
|
||||||
<x-card
|
<x-card
|
||||||
:title="$title"
|
:title="$title"
|
||||||
:subtitle="$subtitle"
|
:subtitle="$subtitle"
|
||||||
@@ -43,4 +45,6 @@
|
|||||||
{{ __('Close') }}
|
{{ __('Close') }}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</dialog>
|
</dialog>
|
||||||
|
@endteleport
|
||||||
|
</div>
|
||||||
@@ -86,9 +86,9 @@ new class extends Component {
|
|||||||
<x-button
|
<x-button
|
||||||
wire:click="$toggle('confirmingPortfolioDeletion')"
|
wire:click="$toggle('confirmingPortfolioDeletion')"
|
||||||
wire:loading.attr="disabled"
|
wire:loading.attr="disabled"
|
||||||
icon="o-trash"
|
class="btn text-error"
|
||||||
class="btn btn-ghost btn-circle text-error"
|
|
||||||
title="{{ __('Delete Portfolio') }}"
|
title="{{ __('Delete Portfolio') }}"
|
||||||
|
label="{{ __('Delete Portfolio') }}"
|
||||||
/>
|
/>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
|||||||
@@ -160,9 +160,9 @@ new class extends Component {
|
|||||||
<x-button
|
<x-button
|
||||||
wire:click="$toggle('confirmingTransactionDeletion')"
|
wire:click="$toggle('confirmingTransactionDeletion')"
|
||||||
wire:loading.attr="disabled"
|
wire:loading.attr="disabled"
|
||||||
icon="o-trash"
|
class="btn text-error"
|
||||||
class="btn btn-ghost btn-circle text-error"
|
|
||||||
title="{{ __('Delete Transaction') }}"
|
title="{{ __('Delete Transaction') }}"
|
||||||
|
label="{{ __('Delete Transaction') }}"
|
||||||
/>
|
/>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user