@props(['name', 'value' => null, 'w' => '']) @php $dotName = dot_name($name); $isError = $errors->has($name); $value = old($dotName, $value); $w = $w ?: 'w-full'; @endphp merge([ 'class' => cn( 'bg-gray-50 border text-sm rounded-lg block p-2.5', $w, 'text-gray-900 focus:ring-blue-500 focus:border-blue-500 disabled:pointer-events-none disabled:opacity-50', $isError ? 'border-red-500 focus:ring-red-500 focus:border-red-500' : 'border-gray-300', 'dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500', ), 'type' => 'text', ]) }} />