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
Similar to how custom html can be supplied, it'd be great to be able to supply a renderComponent attribute, when if defined it would be used instead of Image, Video, Iframe etc. This would make the usage more Sveltish for svelte apps using the library, and prevent one of having to prerender the html for all items upfront.
It'd be a small change, something like rendering the custom component if supplied:
{#if activeItem.renderComponent}
<svelte:component this={activeItem.renderComponent} props={getChildProps()} {smallScreen} />
{:else if activeItem.img}
The text was updated successfully, but these errors were encountered:
Good idea. I'm behind on other things so may not have time to look into it in the short term.
As an alternative, you can use an empty string with the html option and mount a component in onOpen. There's an example in the html section of the readme.
Similar to how custom html can be supplied, it'd be great to be able to supply a renderComponent attribute, when if defined it would be used instead of Image, Video, Iframe etc. This would make the usage more Sveltish for svelte apps using the library, and prevent one of having to prerender the html for all items upfront.
It'd be a small change, something like rendering the custom component if supplied:
The text was updated successfully, but these errors were encountered: