Closed fromaline closed 3 days ago
Experiencing the same issue
code for reference
<Drawer.Root bind:open>
<Drawer.Trigger asChild let:builder>
<Button builders={[builder]}>Add To Library</Button>
</Drawer.Trigger>
<Drawer.Portal>
<Drawer.Content>
<form
action="?/purchase&trackId={trackId}"
enctype="multipart/form-data"
method="POST"
use:enhance
>
<div class="mx-auto flex w-2/3 flex-col items-center space-y-2">
<Drawer.Header>
<Drawer.Title class="text-2xl">Confirm Addition</Drawer.Title>
</Drawer.Header>
<p class="text-secondary-foreground">
Confirm addition of <span class="font-bold">{trackTitle}</span> by
<span class="font-bold">{artistName} </span>to your
<span class="font-bold">{licenseType}</span> collection. This grants
immediate access to all related assets for download. By proceeding, you
agree to the legal obligations and payment terms as per your library's
agreement with That Pitch.
</p>
<Drawer.Footer class="w-2/3">
<Form.Button disabled={$delayed}>
<Reload
class={cn('mr-2 h-4 w-4 animate-spin', { hidden: !$delayed })}
/>
Confirm
</Form.Button>
<Drawer.Close asChild let:builder>
<Button
builders={[builder]}
variant="outline"
disabled={$delayed}
>
Cancel
</Button>
</Drawer.Close>
</Drawer.Footer>
</div>
</form>
</Drawer.Content>
</Drawer.Portal>
</Drawer.Root>
Hey @walker-tx, I believe the actual correct way to handle this will be to update the Drawer.Overlay
to accept a slot. I don't see a good reason to not accept one.
@huntabyte As in updating bits?
oh it's vaul, not bits
Vaul imports the bits Dialog.Overlay
. Just lmk the approach you'd prefer and I'd be happy to get it done 👍🏻
fixed in @next
Describe the bug
Hey 👋 First of all, thanks for the library! It's awesome!
I'm experiencing a minor warning with the Drawer component:
I believe it comes from this file. It seems like
DrawerPrimitive.Overlay
doesn't accept the<slot />
. When I manually remove slot from the component, the warning disappears, while the Drawer still works as expected.Reproduction
https://stackblitz.com/edit/github-eft978?file=src%2Froutes%2F%2Bpage.svelte
Look to the browser console to see the warning.
Logs
System Info
Severity
annoyance