Skip to content

Commit 70d2fcd

Browse files
Fix search (#875)
* define search record contract and framework handoff helper * fix modal filter selection behaviour * tighten modal filter and ranking semantics * Add normalized markdown-to-search extraction * Generate records and upload tooling for new search * update search stuff * Prune generated search index path for crawler-only indexing * fix filtering * fix badges and sitemap * ci: apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
1 parent 092876e commit 70d2fcd

12 files changed

Lines changed: 550 additions & 166 deletions

src/components/Dropdown.tsx

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ type DropdownContentProps = {
2020
className?: string
2121
align?: 'start' | 'center' | 'end'
2222
sideOffset?: number
23+
portal?: boolean
2324
}
2425

2526
type DropdownItemProps = {
@@ -63,24 +64,29 @@ export function DropdownContent({
6364
className,
6465
align = 'end',
6566
sideOffset = 6,
67+
portal = true,
6668
}: DropdownContentProps) {
67-
return (
68-
<DropdownMenu.Portal>
69-
<DropdownMenu.Content
70-
align={align}
71-
sideOffset={sideOffset}
72-
className={twMerge(
73-
'dropdown-content z-[1000] min-w-48 rounded-lg p-1.5',
74-
'border border-gray-200 dark:border-gray-700',
75-
'bg-white dark:bg-gray-800',
76-
'shadow-lg',
77-
className,
78-
)}
79-
>
80-
{children}
81-
</DropdownMenu.Content>
82-
</DropdownMenu.Portal>
69+
const content = (
70+
<DropdownMenu.Content
71+
align={align}
72+
sideOffset={sideOffset}
73+
className={twMerge(
74+
'dropdown-content z-[1000] min-w-48 rounded-lg p-1.5',
75+
'border border-gray-200 dark:border-gray-700',
76+
'bg-white dark:bg-gray-800',
77+
'shadow-lg',
78+
className,
79+
)}
80+
>
81+
{children}
82+
</DropdownMenu.Content>
8383
)
84+
85+
if (!portal) {
86+
return content
87+
}
88+
89+
return <DropdownMenu.Portal>{content}</DropdownMenu.Portal>
8490
}
8591

8692
export function DropdownItem({

0 commit comments

Comments
 (0)