Skip to content
This repository was archived by the owner on Mar 18, 2025. It is now read-only.

Commit 1c1afc8

Browse files
committed
Fix styling for inline form groups
1 parent be116a9 commit 1c1afc8

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

resources/views/components/form-group.blade.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1-
<div {{ $attributes->only('class')->class($groupClass()) }}>
1+
<div @class([
2+
'form-group',
3+
'form-group--mb' => $marginBottom,
4+
'form-group--border' => $border && $inline,
5+
])>
26
<div wire:ignore.self x-data x-form-group>
3-
<div {{ $attributes->except('class') }}>
7+
<div {{ $attributes->class($groupClass()) }}>
48
@include('form-components::partials.form-group-label')
59

610
<div @class([

src/Components/FormGroup.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,9 @@ public function __construct(
3838
public function groupClass(): string
3939
{
4040
return Arr::toCssClasses([
41-
'form-group',
4241
'has-error' => $this->hasErrorsAndShow($this->name),
4342
config('form-components.defaults.form_group.class'),
4443
'form-group--inline' => $this->inline,
45-
'form-group--mb' => $this->marginBottom,
46-
'form-group--border' => $this->border && $this->inline,
4744
]);
4845
}
4946
}

0 commit comments

Comments
 (0)