ui changes
This commit is contained in:
@@ -1,17 +1,21 @@
|
||||
@props([
|
||||
'isWarning' => null,
|
||||
'isBold' => false,
|
||||
'disabled' => null,
|
||||
'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',
|
||||
'defaultClass' => 'text-white hover:bg-coollabs h-10 rounded transition-colors',
|
||||
'defaultWarningClass' => 'text-white bg-red-500 hover:bg-red-600 h-10 rounded',
|
||||
'disabledClass' => 'text-neutral-400 h-10 rounded',
|
||||
'loadingClass' => 'text-black bg-green-500 h-10 rounded',
|
||||
'confirm' => null,
|
||||
'confirmAction' => null,
|
||||
])
|
||||
<button {{ $attributes }} @class([
|
||||
$defaultClass => !$confirm && !$isWarning && !$disabled,
|
||||
$defaultClass => !$confirm && !$isWarning && !$disabled && !$isBold,
|
||||
$defaultWarningClass => ($confirm || $isWarning) && !$disabled,
|
||||
$disabledClass => $disabled,
|
||||
$isBold => $isBold
|
||||
? 'bg-coollabs text-white hover:bg-coollabs-100 h-10 rounded transition-colors'
|
||||
: '',
|
||||
]) @if ($attributes->whereStartsWith('wire:click') && !$disabled)
|
||||
wire:target="{{ explode('(', $attributes->whereStartsWith('wire:click')->first())[0] }}"
|
||||
wire:loading.delay.class="{{ $loadingClass }}" wire:loading.delay.attr="disabled"
|
||||
|
Reference in New Issue
Block a user