Open MentalGear opened 8 months ago
Can you provide some more details on what you're looking to do?
@MentalGear Don't know if your use case is similar to mine. I've checked lib sources and come up with this solution to use drawer with shallow routing. Assuming minimal example, you can replace this part:
{#if $page.state.showModal}
<Modal close={() => history.back()} />
{/if}
with this:
<Drawer.Root open={$page.state.showModal} onClose={()=>history.back()}>
<!-- CONTENTS -->
<!-- Dont add trigger here, use showModal() instead -->
</Drawer.Root>
Describe the feature in detail (code, mocks, or screenshots encouraged)
Thanks for porting this to svelte!
A code-only API (not bound to components) would be tremendously helpful, e.g. for triggering the drawer/modal in shallow routing (sveltekit) or just closing it from an lower component (like a form). Thx!
What type of pull request would this be?
None
Provide relevant links or additional information.
No response