Files
calorie-tracker/src/lib/components/ui/context-menu/context-menu-content.svelte
Fractal-Tess ebec1ab8ea format
2024-01-24 04:32:08 +02:00

25 lines
690 B
Svelte

<script lang="ts">
import { ContextMenu as ContextMenuPrimitive } from 'bits-ui'
import { cn, flyAndScale } from '$lib/utils'
type $$Props = ContextMenuPrimitive.ContentProps
let className: $$Props['class'] = undefined
export let transition: $$Props['transition'] = flyAndScale
export let transitionConfig: $$Props['transitionConfig'] = undefined
export { className as class }
</script>
<ContextMenuPrimitive.Content
{transition}
{transitionConfig}
class={cn(
'z-50 min-w-[8rem] rounded-md border bg-popover p-1 text-popover-foreground shadow-md focus:outline-none',
className
)}
{...$$restProps}
on:keydown
>
<slot />
</ContextMenuPrimitive.Content>