generated from boboko/starter
27 lines
904 B
PHP
27 lines
904 B
PHP
@props([
|
|||
|
|
'type' => 'text',
|
||
|
|
'placeholder' => null,
|
||
|
|
'required' => false,
|
||
|
|
'disabled' => false,
|
||
|
|
'readonly' => false,
|
||
|
|
'value' => null,
|
||
|
|
'autocomplete' => null,
|
||
|
|
'placeholderClass' => 'placeholder:text-neutral-400',
|
||
|
|
])
|
||
|
|
|
||
|
|
<input
|
||
|
|
type="{{ $type }}"
|
||
|
|
@if ($placeholder) placeholder="{{ $placeholder }}" @endif
|
||
|
|
@if ($value !== null) value="{{ $value }}" @endif
|
||
|
|
@if ($autocomplete) autocomplete="{{ $autocomplete }}" @endif
|
||
|
|
@required($required)
|
||
|
|
@disabled($disabled)
|
||
|
|
@readonly($readonly)
|
||
|
|
{{ $attributes->merge([
|
||
|
|
'class' => 'w-full bg-transparent border-0 border-b border-black py-2 ' . $placeholderClass . '
|
||
|
|
focus:outline-none
|
||
|
|
disabled:cursor-not-allowed disabled:opacity-50
|
||
|
|
read-only:opacity-60',
|
||
|
|
]) }}
|
||
|
|
/>
|