summaryrefslogtreecommitdiff
path: root/resources/views/components
diff options
context:
space:
mode:
Diffstat (limited to 'resources/views/components')
-rw-r--r--resources/views/components/dynamic-wrapper.blade.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/resources/views/components/dynamic-wrapper.blade.php b/resources/views/components/dynamic-wrapper.blade.php
new file mode 100644
index 0000000..8593f3a
--- /dev/null
+++ b/resources/views/components/dynamic-wrapper.blade.php
@@ -0,0 +1,9 @@
+@use('Illuminate\View\ComponentAttributeBag')
+@props(['component'])
+@php
+$componentName = $component[0];
+$attributes = new ComponentAttributeBag($component[1] ?? []);
+@endphp
+<x-dynamic-component :component="$componentName" :$attributes>
+ {{ $slot }}
+</x-dynamic-component>