Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support hidden label in fieldset #7583

Merged
merged 9 commits into from
Aug 11, 2023
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<x-filament::fieldset
:label="$getLabel()"
:label-hidden="$isLabelHidden()"
:attributes="
\Filament\Support\prepare_inherited_attributes($attributes)
->merge([
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<x-filament::fieldset
:label="$getLabel()"
:label-hidden="$isLabelHidden()"
:attributes="
\Filament\Support\prepare_inherited_attributes($attributes)
->merge([
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@props([
'label' => null,
'labelHidden' => false,
])

<fieldset
Expand All @@ -10,7 +11,10 @@
}}
>
@if (filled($label))
<legend class="-ms-2 px-2 text-sm font-medium leading-6">
<legend @class([
'-ms-2 px-2 text-sm font-medium leading-6',
'sr-only' => $labelHidden,
])>
{{ $label }}
</legend>
@endif
Expand Down