@props(['name', 'type' => 'text', 'icon' => null, 'placeholder' => '', 'value' => null, 'id' => null]) @php $id = $id ?? $name; $isFile = $type === 'file'; @endphp
@if ($icon) {{-- posisikan ikon tepat di tengah vertikal --}} {!! $icon !!} @endif @if ($isFile) merge(['class' => 'w-full border rounded-lg p-2 h-12 bg-white dark:bg-gray-800 dark:text-gray-100 placeholder-gray-500']) }} /> @else merge(['class' => ($icon ? 'pl-12 ' : '') . 'w-full border rounded-lg h-12 px-3 bg-white dark:bg-gray-800 dark:text-gray-100 placeholder-gray-500']) }} /> @endif