Skip to content

Commit bfc6252

Browse files
committed
refactor(slots): adjust extract slots attributes
1 parent 3161582 commit bfc6252

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

src/resources/views/components/code/block.blade.php

+2-6
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,9 @@
66
'mt-3 mb-6',
77
]) }}>
88
@if ($render)
9-
@if (WireUi::checkSlot($slot))
10-
<div {{ $slot->attributes }}>
11-
{!! Blade::render(serialize_slot($slot), $this->all()) !!}
12-
</div>
13-
@else
9+
<div {{ WireUi::extractAttributes($slot) }}>
1410
{!! Blade::render(serialize_slot($slot), $this->all()) !!}
15-
@endif
11+
</div>
1612
@endif
1713

1814
<div x-ref="code" wire:ignore>

src/resources/views/components/code/preview.blade.php

+2-6
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,9 @@
1010
'bg-white dark:bg-secondary-950' => !$color && !$clean,
1111
'p-6 rounded-lg' => !$clean,
1212
])>
13-
@if (WireUi::checkSlot($slot))
14-
<div {{ $slot->attributes }}>
15-
{!! Blade::render(serialize_slot($slot), $this->all()) !!}
16-
</div>
17-
@else
13+
<div {{ WireUi::extractAttributes($slot) }}>
1814
{!! Blade::render(serialize_slot($slot), $this->all()) !!}
19-
@endif
15+
</div>
2016
</div>
2117

2218
<div x-ref="code" x-show="code" wire:ignore>

0 commit comments

Comments
 (0)