Skip to content

Commit ac9543a

Browse files
authored
🎨 style: Add Dynamic Height to Endpoint/Model Menus (danny-avila#1480)
* style(EndpointsMenu): add scrolling and dynamic height * style(SelectDropDownPop): add dynamic height
1 parent 29473a7 commit ac9543a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

client/src/components/Chat/Menus/EndpointsMenu.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const EndpointsMenu: FC = () => {
3636
<Content
3737
side="bottom"
3838
align="start"
39-
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"
39+
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]"
4040
>
4141
<EndpointItems endpoints={endpoints} selected={selected} />
4242
</Content>

client/src/components/ui/SelectDropDownPop.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ function SelectDropDownPop({
9595
<Content
9696
side="bottom"
9797
align="start"
98-
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"
98+
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]"
9999
>
100100
{availableValues.map((option) => {
101101
return (
@@ -105,7 +105,7 @@ function SelectDropDownPop({
105105
value={option}
106106
selected={!!(value && value === option)}
107107
onClick={() => setValue(option)}
108-
></MenuItem>
108+
/>
109109
);
110110
})}
111111
</Content>

0 commit comments

Comments
 (0)