sprinkle some css

This commit is contained in:
Andras Bacsai
2023-05-12 15:39:07 +02:00
parent 0731b1fe6e
commit d6dc540236
21 changed files with 285 additions and 175 deletions

View File

@@ -6,6 +6,7 @@
'instantSave' => $attributes->has('instantSave'),
'noLabel' => $attributes->has('noLabel'),
'noDirty' => $attributes->has('noDirty'),
'hidden' => $attributes->has('hidden'),
])
<span @class([
@@ -14,7 +15,7 @@
])>
@if (!$noLabel)
<label for={{ $id }} @if (!$noDirty) wire:dirty.class="text-amber-300" @endif
wire:target={{ $id }}>
@if ($hidden) class="hidden" @endif wire:target={{ $id }}>
@if ($label)
{{ $label }}
@else
@@ -23,6 +24,7 @@
@if ($required)
*
@endif
</label>
@endif
@if ($type === 'textarea')
@@ -32,7 +34,8 @@
<input {{ $attributes }} @if ($required) required @endif
@if (!$noDirty) wire:dirty.class="text-black bg-amber-300" @endif
type={{ $type }} id={{ $id }} name={{ $id }}
@if ($instantSave) wire:click='instantSave' wire:model.defer={{ $id }} @else wire:model.defer={{ $value ?? $id }} @endif />
@if ($instantSave) wire:click='instantSave' wire:model.defer={{ $id }} @else wire:model.defer={{ $value ?? $id }} @endif
@if ($hidden) class="hidden" @endif />
@endif
@error($id)
<div class="text-red-500">{{ $message }}</div>