From e06e31642f0346b0e931bda9eec47bcba7c566a5 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Sun, 4 Feb 2024 14:07:08 +0100 Subject: [PATCH] Refactor modal component and add new functionality --- .../views/components/new-modal.blade.php | 26 ++++++++++++------- .../shared/resource-operations.blade.php | 26 +++++++++++++------ 2 files changed, 34 insertions(+), 18 deletions(-) diff --git a/resources/views/components/new-modal.blade.php b/resources/views/components/new-modal.blade.php index d04a40226..9c9ef7065 100644 --- a/resources/views/components/new-modal.blade.php +++ b/resources/views/components/new-modal.blade.php @@ -4,15 +4,22 @@ 'isErrorButton' => false, 'disabled' => false, 'action' => 'delete', + 'content' => null, ])
- @if ($disabled) - {{ $buttonTitle }} - @elseif ($isErrorButton) - {{ $buttonTitle }} + @if ($content) +
+ {{ $content }} +
@else - {{ $buttonTitle }} + @if ($disabled) + {{ $buttonTitle }} + @elseif ($isErrorButton) + {{ $buttonTitle }} + @else + {{ $buttonTitle }} + @endif @endif