fix(show-type): a11y-valid button trigger, anchor menu to logo end
This commit is contained in:
1 parent
cc5782af44
commit
05a4ae298b
1 file changed
+18
-21
@@ -41,32 +41,29 @@ const ShowTypeToggle: FC<Props> = ({ className }) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<DropdownMenuPrimitive.Root>
|
<DropdownMenuPrimitive.Root>
|
||||||
<DropdownMenuPrimitive.Trigger asChild>
|
<span
|
||||||
<span
|
className={cn(
|
||||||
aria-label={`Watch Next: ${current.label}`}
|
'inline-flex h-6 items-center whitespace-nowrap rounded-full bg-primary text-primary-foreground transition-opacity hover:opacity-90',
|
||||||
className={cn(
|
className
|
||||||
'inline-flex h-6 cursor-pointer items-center whitespace-nowrap rounded-full bg-primary text-primary-foreground transition-opacity hover:opacity-90',
|
)}
|
||||||
className
|
>
|
||||||
)}
|
<Link href={toShowTypePath('/', value)} className='pl-2.5 pr-1.5 text-[15px] font-normal leading-[18px]'>
|
||||||
>
|
Watch Next
|
||||||
<Link
|
</Link>
|
||||||
href={toShowTypePath('/', value)}
|
<span aria-hidden className='h-4 w-px bg-primary-foreground/40' />
|
||||||
onPointerDown={(event) => event.stopPropagation()}
|
<DropdownMenuPrimitive.Trigger asChild>
|
||||||
onClick={(event) => event.stopPropagation()}
|
<button
|
||||||
className='pl-2.5 pr-1.5 text-[15px] font-normal leading-[18px]'
|
type='button'
|
||||||
|
className='inline-flex cursor-pointer items-center gap-1.5 pl-1.5 pr-2.5 text-[15px] font-normal leading-[18px]'
|
||||||
>
|
>
|
||||||
Watch Next
|
|
||||||
</Link>
|
|
||||||
<span aria-hidden className='h-4 w-px bg-primary-foreground/40' />
|
|
||||||
<span className='flex items-center gap-1.5 pl-1.5 pr-2.5 text-[15px] font-normal leading-[18px]'>
|
|
||||||
<span className='text-primary-foreground/70'>{current.label}</span>
|
<span className='text-primary-foreground/70'>{current.label}</span>
|
||||||
<ChevronDown className='size-3.5 text-primary-foreground/70' />
|
<ChevronDown className='size-3.5 text-primary-foreground/70' />
|
||||||
</span>
|
</button>
|
||||||
</span>
|
</DropdownMenuPrimitive.Trigger>
|
||||||
</DropdownMenuPrimitive.Trigger>
|
</span>
|
||||||
<DropdownMenuPrimitive.Portal>
|
<DropdownMenuPrimitive.Portal>
|
||||||
<DropdownMenuPrimitive.Content
|
<DropdownMenuPrimitive.Content
|
||||||
align='start'
|
align='end'
|
||||||
sideOffset={8}
|
sideOffset={8}
|
||||||
className={cn(
|
className={cn(
|
||||||
'z-50 w-36 rounded-lg border border-border/60 bg-popover p-1 text-popover-foreground shadow-xl',
|
'z-50 w-36 rounded-lg border border-border/60 bg-popover p-1 text-popover-foreground shadow-xl',
|
||||||
|
|||||||
Reference in new issue
Block a user