-
Notifications
You must be signed in to change notification settings - Fork 11.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix attribute nesting on anonymous components (#36240)
* fix attribute nesting * Apply fixes from StyleCI (#36239) * add test * adjust order
- Loading branch information
1 parent
07f31a7
commit a4a5116
Showing
5 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
tests/Integration/View/templates/components/base-input.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
@props(['disabled' => false]) | ||
|
||
@php | ||
if ($disabled) { | ||
$class = 'disabled-class'; | ||
} else { | ||
$class = 'not-disabled-class'; | ||
} | ||
@endphp | ||
|
||
<input {{ $attributes->merge(['class' => $class]) }} {{ $disabled ? 'disabled' : '' }} /> |
1 change: 1 addition & 0 deletions
1
tests/Integration/View/templates/components/child-input.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<x-base-input foo="bar" :attributes="$attributes" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<x-child-input type="text" :disabled="true" /> |