You've already forked Atomcms-edit
18 lines
1.1 KiB
PHP
Executable File
18 lines
1.1 KiB
PHP
Executable File
@props(['errorBag' => '', 'classes' => '', 'name', 'type' => 'text', 'value' => '', 'placeholder' => '', 'required' => true, 'autofocus' => false, 'readonly' => false])
|
|
|
|
<input
|
|
class="{{ $classes }} focus:ring-0 border-2 rounded-lg w-full px-4 py-2.5 transition-all duration-200 @error($name, $errorBag) !border-red-500 @enderror"
|
|
style="border-color: var(--input-border-color, #4b5563); background-color: var(--input-background, #21242e); color: var(--input-text-color, #e2e8f0);"
|
|
id="{{ $name }}" type="{{ $type }}" name="{{ $name }}" value="{{ $value }}"
|
|
autocomplete="{{ $name }}" placeholder="{{ $placeholder }}" @if ($required) required @endif
|
|
@if ($autofocus) autofocus="{{ $name }}" @endif
|
|
@if ($readonly) readonly @endif
|
|
onfocus="this.style.borderColor='var(--color-primary)'; this.style.boxShadow='0 0 0 3px color-mix(in srgb, var(--color-primary) 20%, transparent)'"
|
|
onblur="this.style.borderColor='var(--input-border-color, #4b5563)'; this.style.boxShadow='none'">
|
|
|
|
@error($name, $errorBag)
|
|
<p class="mt-1.5 text-xs font-medium" style="color: var(--button-danger-color, #ef4444);">
|
|
{{ $message }}
|
|
</p>
|
|
@enderror
|