Mark the logout menu item as destructive

This commit is contained in:
Steven RYDELL
2026-07-29 09:06:20 +02:00
parent 09d43f1e9b
commit 0a8dfb44be
2 changed files with 5 additions and 1 deletions
+4 -1
View File
@@ -81,12 +81,15 @@ const DropdownMenuItem = React.forwardRef<
React.ComponentRef<typeof DropdownMenuPrimitive.Item>,
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {
inset?: boolean;
variant?: 'default' | 'destructive';
}
>(({ className, inset, ...props }, ref) => (
>(({ className, inset, variant = 'default', ...props }, ref) => (
<DropdownMenuPrimitive.Item
ref={ref}
data-variant={variant}
className={cn(
'relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0',
'data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive',
inset && 'pl-8',
className,
)}