@props(['block']) @php /** @var \App\Models\PageBlock $block */ $c = $block->content ?? []; $size = (string) data_get($c, 'text_size', 'base'); $align = (string) data_get($c, 'text_alignment', 'center'); $sizeClass = match ($size) { 'sm' => 'text-sm sm:text-[15px]', 'lg' => 'text-lg sm:text-xl', default => 'text-[15px] sm:text-base', }; $alignClass = match ($align) { 'left' => 'text-left', 'right' => 'text-right', default => 'text-center', }; $bodyRaw = data_get($c, 'body'); $body = is_string($bodyRaw) ? trim($bodyRaw) : ''; @endphp {{-- Body must be on one line inside the div: whitespace-pre-line turns indentation/newlines around {{ $body }} into visible gaps. --}}