Can I mix and match standard foundry views with Svelte components?
And if so, how so? E.g. on my items sheet I want to render the default ActiveEffects view on one of the tabs. No point recreating the wheel there methinks.
I tried this as the code for the tab:
<script> import ScrollingContainer from "~/helpers/svelte-components/ScrollingContainer.svelte"; import { getContext } from "svelte"; import { ActiveEffectList } from "../../libs/foundry.js"; const doc = getContext("#doc"); console.log($doc); const activeEffects = new ActiveEffectList({ object: $doc, state: $doc.Effects, editable: true, }); activeEffects.render(true);</script>
<script> import ScrollingContainer from "~/helpers/svelte-components/ScrollingContainer.svelte"; import { getContext } from "svelte"; import { ActiveEffectList } from "../../libs/foundry.js"; const doc = getContext("#doc"); console.log($doc); const activeEffects = new ActiveEffectList({ object: $doc, state: $doc.Effects, editable: true, }); activeEffects.render(true);</script>
But the import doesn't work.
Recent Announcements
Continue the conversation
Join the Discord to ask follow-up questions and connect with the community