feat(Drawer): add default padding classes for content snippet
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user