From 9a6eba5fd98f7fef52a2e63d22be17049468dd3d Mon Sep 17 00:00:00 2001
From: philipp lang <philipp@aweos.de>
Date: Tue, 24 Dec 2024 21:21:19 +0100
Subject: [PATCH] Merge class attributes to form text field

---
 app/View/Form/Text.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/View/Form/Text.php b/app/View/Form/Text.php
index 3cacb3ad..1f274277 100644
--- a/app/View/Form/Text.php
+++ b/app/View/Form/Text.php
@@ -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)