feat(Drawer): add default padding classes for content snippet

This commit is contained in:
Ilia Mashkov
2026-02-07 19:26:46 +03:00
parent a1bc359c7f
commit 7f01a9cc85
4 changed files with 17 additions and 16 deletions

View File

@@ -14,7 +14,7 @@ import type { Snippet } from 'svelte';
interface Props {
isOpen?: boolean;
trigger?: Snippet<[{ isOpen: boolean; onClick: () => void }]>;
content?: Snippet<[{ isOpen: boolean }]>;
content?: Snippet<[{ isOpen: boolean; className?: string }]>;
contentClassName?: string;
}
@@ -35,7 +35,7 @@ function handleClick() {
</Button>
{/if}
</DrawerTrigger>
<DrawerContent class={cn('min-h-60', contentClassName)}>
{@render content?.({ isOpen })}
<DrawerContent>
{@render content?.({ isOpen, className: cn('min-h-60 px-2 pt-4 pb-8', contentClassName) })}
</DrawerContent>
</DrawerRoot>