Skip to content

Commit

Permalink
Inline local variable override
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Dec 5, 2024
1 parent a36760b commit c78ddeb
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,12 @@
@php
$tag = 'h' . $level;
$id = $id ?? \Illuminate\Support\Str::slug($slot);
@endphp

$extraAttributes = array_merge($extraAttributes, [
<{{ $tag }} {{ $attributes->merge(array_merge($extraAttributes, [
'id' => $addPermalink ? $id : ($extraAttributes['id'] ?? null),
'class' => trim(($extraAttributes['class'] ?? '') . ($addPermalink ? ' group w-fit scroll-mt-2' : '')),
]);
@endphp

<{{ $tag }} {{ $attributes->merge($extraAttributes) }}>
])) }}>
{!! $slot !!}
@if($addPermalink === true)
<a href="#{{ $id }}" class="heading-permalink opacity-0 ml-1 transition-opacity duration-300 ease-linear px-1 group-hover:opacity-100 focus:opacity-100 group-hover:grayscale-0 focus:grayscale-0" title="Permalink">
Expand Down

0 comments on commit c78ddeb

Please sign in to comment.