From f787b6394fe7c822738669b6d8270044196849a4 Mon Sep 17 00:00:00 2001 From: "Daniel S. Billing" Date: Fri, 15 Dec 2023 23:28:32 +0100 Subject: [PATCH] Update modal.blade.php --- resources/views/components/modal.blade.php | 87 ++++++++++++++++------ 1 file changed, 65 insertions(+), 22 deletions(-) diff --git a/resources/views/components/modal.blade.php b/resources/views/components/modal.blade.php index 9abe61f6b..179c741a7 100644 --- a/resources/views/components/modal.blade.php +++ b/resources/views/components/modal.blade.php @@ -1,25 +1,68 @@ -@props(['formAction' => false]) +@props(['id', 'maxWidth']) -
- @if($formAction) -
- @csrf - @endif -
- @if(isset($title)) -

- {{ $title }} -

- @endif -
-
- {{ $content }} -
+@php +$id = $id ?? md5($attributes->wire('model')); -
- {{ $buttons }} -
- @if($formAction) -
- @endif +$maxWidth = [ + 'sm' => 'sm:max-w-sm', + 'md' => 'sm:max-w-md', + 'lg' => 'sm:max-w-lg', + 'xl' => 'sm:max-w-xl', + '2xl' => 'sm:max-w-2xl', +][$maxWidth ?? '2xl']; +@endphp + +