This repository was archived by the owner on Mar 18, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
resources/views/components Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 22 <x-dynamic-component :component =" formComponentName('label')"
33 :for =" $inputId"
44 class =" {{ $inline && ! $isCheckboxGroup ? ' form-group__inline-label' : ' ' } }"
5+ :id =" $labelId"
56 >
67 {{ $label } }
78 </x-dynamic-component >
Original file line number Diff line number Diff line change @@ -20,6 +20,9 @@ class FormGroup extends BladeComponent
2020 /** @var string */
2121 public $ helpText ;
2222
23+ /** @var null|string */
24+ public $ labelId ;
25+
2326 public bool $ inline ;
2427 public bool $ border ;
2528 public bool $ isCheckboxGroup ;
@@ -32,7 +35,8 @@ public function __construct(
3235 bool $ showErrors = true ,
3336 string $ helpText = null ,
3437 bool $ border = false ,
35- bool $ isCheckboxGroup = false
38+ bool $ isCheckboxGroup = false ,
39+ string $ labelId = null
3640 ) {
3741 $ this ->name = $ name ;
3842 $ this ->inputId = $ inputId ?? $ name ;
@@ -42,6 +46,7 @@ public function __construct(
4246 $ this ->helpText = $ helpText ;
4347 $ this ->border = $ border ;
4448 $ this ->isCheckboxGroup = $ isCheckboxGroup ;
49+ $ this ->labelId = $ labelId ;
4550 }
4651
4752 public function groupClass (): string
You can’t perform that action at this time.
0 commit comments