mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-10-30 04:29:05 +01:00
30 lines
988 B
Svelte
30 lines
988 B
Svelte
<script lang="ts">
|
|
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
|
|
import ChevronRightIcon from '@lucide/svelte/icons/chevron-right';
|
|
import { cn } from '#lib/utils/style.js';
|
|
|
|
let {
|
|
ref = $bindable(null),
|
|
class: className,
|
|
inset,
|
|
children,
|
|
...restProps
|
|
}: DropdownMenuPrimitive.SubTriggerProps & {
|
|
inset?: boolean;
|
|
} = $props();
|
|
</script>
|
|
|
|
<DropdownMenuPrimitive.SubTrigger
|
|
bind:ref
|
|
data-slot="dropdown-menu-sub-trigger"
|
|
data-inset={inset}
|
|
class={cn(
|
|
"data-highlighted:bg-fg/6 text-control [&_svg:not([class*='text-'])]:text-fg-muted data-open:bg-fg/6 relative flex min-h-9 cursor-pointer items-center gap-2 rounded-sm px-2.5 outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-45 data-inset:pl-8.5 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
className
|
|
)}
|
|
{...restProps}
|
|
>
|
|
{@render children?.()}
|
|
<ChevronRightIcon class="ml-auto" />
|
|
</DropdownMenuPrimitive.SubTrigger>
|