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

[7.x] Add dynamic slot name support #33724

Merged
merged 1 commit into from
Aug 1, 2020
Merged

[7.x] Add dynamic slot name support #33724

merged 1 commit into from
Aug 1, 2020

Conversation

cbl
Copy link
Contributor

@cbl cbl commented Aug 1, 2020

This pr adds support for dynamic slot names using the : prefix:

<x-slot :name="$foo">
    {{-- ... --}}
</x-slot>

@GrahamCampbell GrahamCampbell changed the title Add dynamic slot name support [7.x] Add dynamic slot name support Aug 1, 2020
@taylorotwell taylorotwell merged commit 8f70e82 into laravel:7.x Aug 1, 2020
@driesvints
Copy link
Member

@cbl good one!

@mnaderian
Copy link

mnaderian commented Aug 5, 2020

Should we add it to the main docs as Dynamic Slot Names?

@cbl
Copy link
Contributor Author

cbl commented Aug 5, 2020

@mnabialek I think the way it works now is the way you would expect it to work since dynamic attributes on Blade X components work the same way. However it might be useful to read that it is possible when flying over the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants