From a67ae71ed12f447891987d44c51b9f3ccc3d3cdd Mon Sep 17 00:00:00 2001 From: Ricardo Gobbo de Souza Date: Tue, 1 Nov 2022 15:38:32 -0300 Subject: [PATCH] Accept slot in dynamic component --- resources/views/components/states/display.blade.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/resources/views/components/states/display.blade.php b/resources/views/components/states/display.blade.php index fc4a477..73237c7 100644 --- a/resources/views/components/states/display.blade.php +++ b/resources/views/components/states/display.blade.php @@ -1,9 +1,11 @@
mergeThemeProvider($themeProvider, 'container') }}> @if (is_array($value) && $component = target_get($value, 'component')) merge(Arr::except($value, 'component')) }} + {{ $attributes->merge(Arr::except($value, ['component', 'slot'])) }} :component="$component" - /> + > + {!! target_get($value, 'slot', $slot) !!} + @elseif (Str::endsWith($value, ['.jpg', '.jpeg', '.gif', '.png'])) mergeOnlyThemeProvider($themeProvider, 'img') }} src="{{ $value }}" /> @elseif (Str::endsWith($value, '.mp3'))