lasthourcloud/resources/views/components/forms/textarea.blade.php

25 lines
936 B
PHP
Raw Normal View History

2023-07-13 11:16:24 +00:00
<div class="form-control">
2023-06-02 13:15:12 +00:00
@if ($label)
2023-09-19 13:51:13 +00:00
<label for="small-input" class="flex items-center gap-1 mb-1 text-sm font-medium">{{ $label }}
@if ($required)
<x-highlighted text="*" />
@endif
@if ($helper)
<x-helper :helper="$helper" />
@endif
2023-05-17 13:46:20 +00:00
</label>
@endif
2023-08-11 18:19:42 +00:00
<textarea placeholder="{{ $placeholder }}" {{ $attributes->merge(['class' => $defaultClass]) }}
2023-09-15 13:39:25 +00:00
@if ($realtimeValidation) wire:model.debounce.200ms="{{ $id }}"
2023-09-15 09:55:58 +00:00
@else
wire:model.defer={{ $value ?? $id }}
2023-09-19 13:51:13 +00:00
wire:dirty.class="input-warning" @endif
2023-09-15 09:55:58 +00:00
@disabled($disabled) @readonly($readonly) @required($required) id="{{ $id }}" name="{{ $name }}"
2023-09-19 13:51:13 +00:00
name={{ $id }}></textarea>
2023-05-17 13:46:20 +00:00
@error($id)
2023-08-11 18:19:42 +00:00
<label class="label">
<span class="text-red-500 label-text-alt">{{ $message }}</span>
</label>
2023-05-17 13:46:20 +00:00
@enderror
</div>