You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Slots are not supported by LiveSvelte because of issues in Svelte itself. I don't have the issue number but once it's resolved, this usage can be officially supported.
A working named slot example is in the following files. Timeline.svelte optionally accepts a slot named 'toast.' Other use cases might not work.
Note: The Svelte way to specify slot content is something like < span slot='slot_name'> . This doesn't work in Heex templates. Use the Phoenix <: slot_name> way instead.
Another downside is that Elixir warns when compiling:
warning: undefined slot "toast" for component LiveSvelte.svelte/1
lib/kantan_web/controllers/page_html/timeline.html.heex:6
Slots are not supported by LiveSvelte because of issues in Svelte itself. I don't have the issue number but once it's resolved, this usage can be officially supported.
A working named slot example is in the following files. Timeline.svelte optionally accepts a slot named 'toast.' Other use cases might not work.
Note: The Svelte way to specify slot content is something like < span slot='slot_name'> . This doesn't work in Heex templates. Use the Phoenix <: slot_name> way instead.
Another downside is that Elixir warns when compiling:
https://github.com/dev-guy/phoenix-ash-svelte-flowbite/blob/main/lib/kantan_web/controllers/page_html/timeline.html.heex
https://github.com/dev-guy/phoenix-ash-svelte-flowbite/blob/main/assets/svelte/Timeline.svelte
The text was updated successfully, but these errors were encountered: