Skip to content

Commit 0105c63

Browse files
authored
Update blade.md
1 parent 5074698 commit 0105c63

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

blade.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,14 +1043,14 @@ Given the component definition above, we may render the component like so:
10431043

10441044
Sometimes you may want to access data from a parent component inside a child component. In these cases, you can use the `@aware` directive to make outside data available inside the component.
10451045

1046-
For example, imagine we are building a complex menu component with a parent `<x-menu>` and child `<x-menu.item>` that would be used like so:
1046+
For example, imagine we are building a complex menu component consisting of a parent `<x-menu>` and child `<x-menu.item>` that would be used like so:
10471047

10481048
<x-menu color="purple">
10491049
<x-menu.item>...</x-menu.item>
10501050
<x-menu.item>...</x-menu.item>
10511051
</x-menu>
10521052

1053-
Here's what the `<x-menu>` component might look like:
1053+
Given the above usage, here's what the `<x-menu>` component might look like:
10541054

10551055
<!-- /resources/views/components/menu/index.blade.php -->
10561056

@@ -1060,7 +1060,7 @@ Here's what the `<x-menu>` component might look like:
10601060
{{ $slot }}
10611061
</ul>
10621062

1063-
In order to access the `$color` property passed into `<x-menu>` from `<x-menu.item>`, you will need to use the `@aware` directive:
1063+
Because the `$color` prop was only passed into the parent `<x-menu>`, it won't be available inside `<x-menu.item>`. However, if we use the `@aware` directive, we can make it available inside `<x-menu.item>` as well:
10641064

10651065
<!-- /resources/views/components/menu/item.blade.php -->
10661066

0 commit comments

Comments
 (0)