@props([ 'subject' => null, 'title' => null, 'subtitle' => null, 'align' => 'left', 'class' => '', 'level' => 'h2', // heading tag: 'h1' on pages without a hero ]) @php $alignClass = match ($align) { 'center' => 'text-center', 'right' => 'text-right', default => 'text-left', }; $marginClass = match ($align) { 'center' => 'mx-auto', 'right' => 'mr-0 ml-auto', default => 'ml-0', }; $tag = in_array($level, ['h1', 'h2', 'h3'], true) ? $level : 'h2'; $subtitles = is_array($subtitle) ? $subtitle : ($subtitle ? [$subtitle] : []); @endphp
{!! $text !!}
@endforeach