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
{{ message }}
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.
Now suppose I wanted to write a story around a component that should be embedded but doesn't have any concrete implementations. Then I would construct the source template in a string but I would not be able to use import any more, since the template is a string in memory and not a file on disk, and twing-loader would not be able to do its magic. How, then, should I load such a template that is stored in a string (that may use {% embed %} to reference other templates)?
The text was updated successfully, but these errors were encountered:
When would the template be created? At run-time? Or at compile-time?
In a classic Twing context, I would use an instance of TwingLoaderArray loader (in conjunction with a TwingLoaderChain to hold both the array loader and the filesystem ones) where I would add the template whenever needed. It should be easy to use the same pattern with twing-loader since twing-loader expect an instance of TwingEnvironment to be passed as parameter
Hi. I use Twing to integrate Twig templates into Storybook and that works great when you want to build a story around an external Twig template.
Now suppose I wanted to write a story around a component that should be embedded but doesn't have any concrete implementations. Then I would construct the source template in a string but I would not be able to use
import
any more, since the template is a string in memory and not a file on disk, andtwing-loader
would not be able to do its magic. How, then, should I load such a template that is stored in a string (that may use{% embed %}
to reference other templates)?The text was updated successfully, but these errors were encountered: