12 lines
425 B
PHP
12 lines
425 B
PHP
<label {{ $attributes->class([
|
|
'block text-sm font-medium',
|
|
'text-negative-600' => $hasError,
|
|
'opacity-60' => $attributes->get('disabled'),
|
|
'text-gray-900 dark:text-gray-400' => !$hasError,
|
|
]) }}>
|
|
@php
|
|
$displayLabel = is_string($label) ? html_entity_decode($label, ENT_QUOTES | ENT_HTML5, 'UTF-8') : ($label ?? $slot);
|
|
echo $displayLabel;
|
|
@endphp
|
|
</label>
|