Skip to content

Commit

Permalink
Use radix css var to limit desktop menu height
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkeye217 committed Aug 4, 2024
1 parent 88d4b69 commit 1eeecda
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion web/src/components/menu/GeneralSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,18 @@ export default function GeneralSettings({ className }: GeneralSettingsProps) {
</Tooltip>
</Trigger>
<Content
style={
isDesktop
? {
maxHeight:
"var(--radix-dropdown-menu-content-available-height)",
}
: {}
}
className={
isDesktop ? "mr-5 w-72" : "max-h-[75dvh] overflow-hidden p-2"
isDesktop
? "scrollbar-container mr-5 w-72 overflow-y-auto"
: "max-h-[75dvh] overflow-hidden p-2"
}
>
<div className="scrollbar-container w-full flex-col overflow-y-auto overflow-x-hidden">
Expand Down

0 comments on commit 1eeecda

Please sign in to comment.