Spaces:
Running
Running
| <script lang="ts"> | |
| import { cn } from '$lib/utils.js'; | |
| import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui'; | |
| let { | |
| ref = $bindable(null), | |
| class: className, | |
| inset, | |
| variant = 'default', | |
| ...restProps | |
| }: DropdownMenuPrimitive.ItemProps & { | |
| inset?: boolean; | |
| variant?: 'default' | 'destructive'; | |
| } = $props(); | |
| </script> | |
| <DropdownMenuPrimitive.Item | |
| bind:ref | |
| data-slot="dropdown-menu-item" | |
| data-inset={inset} | |
| data-variant={variant} | |
| class={cn( | |
| "focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:text-destructive not-data-[variant=destructive]:focus:**:text-accent-foreground group/dropdown-menu-item relative flex min-h-7 cursor-default items-center gap-2 rounded-md px-2 py-1 text-xs/relaxed outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:pl-7.5 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5", | |
| className | |
| )} | |
| {...restProps} | |
| /> | |