mirror of
https://github.com/bartvdbraak/omnidash.git
synced 2025-04-29 00:11:21 +00:00
29 lines
734 B
Svelte
29 lines
734 B
Svelte
<script lang="ts">
|
|
import { DropdownMenu as DropdownMenuPrimitive } from "bits-ui";
|
|
import { cn, flyAndScale } from "$lib/utils";
|
|
|
|
type $$Props = DropdownMenuPrimitive.SubContentProps;
|
|
|
|
let className: $$Props["class"] = undefined;
|
|
export let transition: $$Props["transition"] = flyAndScale;
|
|
export let transitionConfig: $$Props["transitionConfig"] = {
|
|
x: -10,
|
|
y: 0
|
|
};
|
|
export { className as class };
|
|
</script>
|
|
|
|
<DropdownMenuPrimitive.SubContent
|
|
{transition}
|
|
{transitionConfig}
|
|
class={cn(
|
|
"z-50 min-w-[8rem] rounded-md border bg-popover p-1 text-popover-foreground shadow-lg focus:outline-none",
|
|
className
|
|
)}
|
|
{...$$restProps}
|
|
on:keydown
|
|
on:focusout
|
|
on:pointermove
|
|
>
|
|
<slot />
|
|
</DropdownMenuPrimitive.SubContent>
|