17 lines
657 B
PHP
17 lines
657 B
PHP
{{-- Bagian formulir: fieldset + legend + grid kolom responsif (container query). Kolom lebar penuh: beri class="col-span-full". --}}
|
|
@props(['title', 'description' => null, 'columns' => 2])
|
|
|
|
@php
|
|
$columns = in_array((int) $columns, [1, 2, 3], true) ? (int) $columns : 2;
|
|
@endphp
|
|
|
|
<fieldset {{ $attributes->class('form-section') }}>
|
|
<legend class="form-section__title">{{ $title }}</legend>
|
|
@if ($description) <p class="form-section__desc">{{ $description }}</p> @endif
|
|
<div class="form-section__body">
|
|
<div class="form-section__grid form-section__grid--{{ $columns }}">
|
|
{{ $slot }}
|
|
</div>
|
|
</div>
|
|
</fieldset>
|