Closed thecodeclimber closed 8 months ago
I have the same issue. Also, the formatting of texts is not functioning correctly inside those tags.
According to https://laravel.com/docs/10.x/blade#slots the named slot closing tag can be simplified to </x-slot>
. I tested it and both variants work with Laravel:
<x-slot:trigger>Open Modal</x-slot:trigger>
<x-slot:trigger>Open Modal</x-slot>
Therefore, both variants should be supported.
For the moment I will use the long version as the indentation is done correctly, while using the short version destroys the layout.
In Laravel 9 there is a new shorthand for named slots: https://laravel.com/docs/9.x/releases#slot-name-shortcut
However, there does not seem to be any syntax highlighting for this new feature -- as this screenshot indicates:
<x-modal.trigger>
relates to a blade component within themodal
component directory whereas<x-slot:trigger>
relates to a named slot within the<x-modal>
component.It would be nice if we could have syntax highlighting for
<x-slot:trigger>
similar to what we have for<x-modal.trigger>
. Even better would be to have a different color for:trigger
then we have forx-slot
to easily see which slot we are accessing.