sprinkle some css
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
@props([
|
||||
'isWarning' => null,
|
||||
'disabled' => null,
|
||||
'defaultClass' => 'text-white bg-neutral-800 hover:bg-violet-600 h-8',
|
||||
'defaultWarningClass' => 'text-white bg-red-500 hover:bg-red-600 h-8',
|
||||
'disabledClass' => 'text-neutral-400 bg-neutral-900 h-8',
|
||||
'loadingClass' => 'text-black bg-green-500 h-8',
|
||||
'defaultClass' => 'text-white hover:bg-coollabs h-8 rounded transition-colors',
|
||||
'defaultWarningClass' => 'text-white bg-red-500 hover:bg-red-600 h-8 rounded',
|
||||
'disabledClass' => 'text-coolgray-200 h-8 rounded',
|
||||
'loadingClass' => 'text-black bg-green-500 h-8 rounded',
|
||||
'confirm' => null,
|
||||
'confirmAction' => null,
|
||||
])
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user