🎨 style: Add Dynamic Height to Endpoint/Model Menus (#1480)

* style(EndpointsMenu): add scrolling and dynamic height

* style(SelectDropDownPop): add dynamic height
This commit is contained in:
Danny Avila 2024-01-03 10:07:36 -05:00 committed by GitHub
parent 29473a72db
commit ac9543a673
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -36,7 +36,7 @@ const EndpointsMenu: FC = () => {
<Content <Content
side="bottom" side="bottom"
align="start" 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} /> <EndpointItems endpoints={endpoints} selected={selected} />
</Content> </Content>

View file

@ -95,7 +95,7 @@ function SelectDropDownPop({
<Content <Content
side="bottom" side="bottom"
align="start" 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) => { {availableValues.map((option) => {
return ( return (
@ -105,7 +105,7 @@ function SelectDropDownPop({
value={option} value={option}
selected={!!(value && value === option)} selected={!!(value && value === option)}
onClick={() => setValue(option)} onClick={() => setValue(option)}
></MenuItem> />
); );
})} })}
</Content> </Content>