Build
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
@props(['name', 'label', 'value' => '', 'textarea' => false, 'type' => 'text'])
|
||||
|
||||
<div>
|
||||
<label for="{{ $name }}" class="block text-sm font-medium text-gray-700">{{ $label }}</label>
|
||||
@if ($textarea)
|
||||
<textarea id="{{ $name }}" name="{{ $name }}" rows="4" class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500">{{ old($name, $value) }}</textarea>
|
||||
@else
|
||||
<input id="{{ $name }}" type="{{ $type }}" name="{{ $name }}" value="{{ old($name, $value) }}" class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500">
|
||||
@endif
|
||||
@error($name)
|
||||
<p class="mt-1 text-sm text-red-600">{{ $message }}</p>
|
||||
@enderror
|
||||
</div>
|
||||
Reference in New Issue
Block a user