From 93ed40b00b9f503e74ebbe7f4381143dbce5dc3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zain=F0=9F=8D=95?= Date: Fri, 13 Dec 2024 19:42:20 +0800 Subject: [PATCH] refactor: extract banner content into a separate component --- src/views/components/banner.blade.php | 30 +++---------------- .../components/banner/_content.blade.php | 20 +++++++++++++ 2 files changed, 24 insertions(+), 26 deletions(-) create mode 100644 src/views/components/banner/_content.blade.php diff --git a/src/views/components/banner.blade.php b/src/views/components/banner.blade.php index 4aceac9..64d3b05 100644 --- a/src/views/components/banner.blade.php +++ b/src/views/components/banner.blade.php @@ -4,31 +4,9 @@ @if ($isFixed)
- @endif - -
-
- - @if ($icon) - - @endif - -
- {{ $slot }} -
+ @include('mbv::banner._content')
- - @if ($actions) -
- {{ $actions }} -
- @endif -
- - @if ($isFixed) -
-@endif - + @else + @include('mbv::banner._content') + @endif diff --git a/src/views/components/banner/_content.blade.php b/src/views/components/banner/_content.blade.php new file mode 100644 index 0000000..6bd860b --- /dev/null +++ b/src/views/components/banner/_content.blade.php @@ -0,0 +1,20 @@ +
+
+ + @if ($icon) + + @endif + +
+ {{ $slot }} +
+
+ + @if ($actions) +
+ {{ $actions }} +
+ @endif +