Merge class attributes to form text field

This commit is contained in:
philipp lang 2024-12-24 21:21:19 +01:00
parent d41f24fdea
commit 9a6eba5fd9
1 changed files with 2 additions and 2 deletions
app/View/Form

View File

@ -26,7 +26,7 @@ class Text extends Component
public function render()
{
return <<<'HTML'
<label class="flex flex-col group {{$heightClass}}" for="{{$id}}" style="{{$heightVars}}">
<label {{ $attributes->merge(['class' => 'flex flex-col group '.$heightClass])->only('class') }} for="{{$id}}" style="{{$heightVars}}">
@if ($label)
<x-form::label :required="$required">{{$label}}</x-form::label>
@endif
@ -42,7 +42,7 @@ class Text extends Component
group-[.size-default]:text-sm group-[.size-sm]:text-xs
group-[.size-default]:p-2 group-[.size-sm]:p-1
"
{{ $attributes }}
{{ $attributes->except('class') }}
/>
<x-ui::errors :for="$name" />
@if($hint)