99 ' buttons' => null ,
1010 ' buttonsStyle' => ' modal-buttons' ,
1111 ' closeButtonOnly' => false ,
12+ ' closeButtonClass' => ' modal-close' ,
1213 ' wireClose' => false ,
1314 ' escToClose' => true ,
1415 ' fixedPosition' => false ,
15- ' paddingClass' => ' p-8 sm:p-10'
16+ ' paddingClass' => ' p-8 sm:p-10' ,
17+ ' breakpoint' => ' md' ,
18+ ' wrapperClass' => ' modal-content-wrapper' ,
19+ ' contentClass' => ' modal-content' ,
1620] )
1721
22+ @php
23+ $fixedPositionClass = [
24+ ' sm' => ' sm:mx-auto' ,
25+ ' md' => ' md:mx-auto' ,
26+ ][$breakpoint ] ?? ' md:mx-auto' ;
27+
28+ $relativePositionClass = [
29+ ' sm' => ' sm:m-auto' ,
30+ ' md' => ' md:m-auto' ,
31+ ][$breakpoint ] ?? ' md:m-auto' ;
32+ @endphp
33+
1834<div class =" fixed inset-0 z-50 opacity-75 dark:opacity-50 bg-theme-secondary-900 dark:bg-theme-secondary-800" ></div >
1935
2036<div
@@ -36,15 +52,29 @@ class="flex overflow-y-auto fixed inset-0 z-50 md:py-10 md:px-8"
3652 @endif
3753>
3854 <div
39- class =" modal-content-wrapper @if ($fixedPosition ) md:mx-auto @else md:m-auto @endif w-full {{ $class } } {{ $widthClass } }"
40- @if ($style ) style =" {{ $style } }" @endif
55+ @class ([
56+ ' w-full' ,
57+ $wrapperClass ,
58+ $fixedPositionClass => $fixedPosition ,
59+ $relativePositionClass => ! $fixedPosition ,
60+ $class ,
61+ $widthClass ,
62+ ] )
63+
64+ @if ($style )
65+ style =" {{ $style } }"
66+ @endif
4167 >
42- <div class =" modal-content custom-scroll {{ $widthClass } }" >
68+ <div @class ([
69+ ' custom-scroll' ,
70+ $contentClass ,
71+ $widthClass ,
72+ ] )>
4373 <div class =" {{ $paddingClass } }" >
4474 @if ($wireClose )
4575 <button
4676 type =" button"
47- class = " modal-close "
77+ @ class( [ $closeButtonClass ] )
4878 @if ($wireClose ?? false ) wire:click =" {{ $wireClose } }" @endif
4979 >
5080 <x-ark-icon name =" cross" size =" sm" class =" m-auto" />
0 commit comments