Skip to content

Commit

Permalink
🎨 style: Add Dynamic Height to Endpoint/Model Menus (danny-avila#1480)
Browse files Browse the repository at this point in the history
* style(EndpointsMenu): add scrolling and dynamic height

* style(SelectDropDownPop): add dynamic height
  • Loading branch information
danny-avila authored Jan 3, 2024
1 parent 0445c94 commit e7bbd9f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion client/src/components/Chat/Menus/EndpointsMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const EndpointsMenu: FC = () => {
<Content
side="bottom"
align="start"
className="mt-2 min-w-[340px] overflow-hidden rounded-lg border border-gray-100 bg-white shadow-lg dark:border-gray-700 dark:bg-gray-900 dark:text-white"
className="mt-2 max-h-[65vh] min-w-[340px] overflow-y-auto rounded-lg border border-gray-100 bg-white shadow-lg dark:border-gray-700 dark:bg-gray-900 dark:text-white lg:max-h-[75vh]"
>
<EndpointItems endpoints={endpoints} selected={selected} />
</Content>
Expand Down
4 changes: 2 additions & 2 deletions client/src/components/ui/SelectDropDownPop.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ function SelectDropDownPop({
<Content
side="bottom"
align="start"
className="mt-2 max-h-60 min-w-full overflow-hidden overflow-y-auto rounded-lg border border-gray-100 bg-white shadow-lg dark:border-gray-700 dark:bg-gray-900 dark:text-white"
className="mt-2 max-h-[52vh] min-w-full overflow-hidden overflow-y-auto rounded-lg border border-gray-100 bg-white shadow-lg dark:border-gray-700 dark:bg-gray-900 dark:text-white lg:max-h-[52vh]"
>
{availableValues.map((option) => {
return (
Expand All @@ -105,7 +105,7 @@ function SelectDropDownPop({
value={option}
selected={!!(value && value === option)}
onClick={() => setValue(option)}
></MenuItem>
/>
);
})}
</Content>
Expand Down

0 comments on commit e7bbd9f

Please sign in to comment.