Fix dropdown menu overflow (#468)

This commit is contained in:
1ilit
2025-05-29 22:35:47 +04:00
committed by GitHub
parent f2d60a70e0
commit 388c7b4fee
2 changed files with 10 additions and 6 deletions

View File

@@ -1770,7 +1770,7 @@ export default function ControlPanel({
direction: isRtl(i18n.language) ? "rtl" : "ltr", direction: isRtl(i18n.language) ? "rtl" : "ltr",
}} }}
render={ render={
<Dropdown.Menu> <Dropdown.Menu className="menu max-h-[calc(100vh-80px)] overflow-auto">
{Object.keys(menu[category]).map((item, index) => { {Object.keys(menu[category]).map((item, index) => {
if (menu[category][item].children) { if (menu[category][item].children) {
return ( return (

View File

@@ -1,4 +1,4 @@
@import 'tailwindcss'; @import "tailwindcss";
@config '../tailwind.config.js'; @config '../tailwind.config.js';
@@ -67,7 +67,7 @@
background-color: rgba(var(--semi-blue-6), 1); background-color: rgba(var(--semi-blue-6), 1);
} }
.semi-spin-wrapper{ .semi-spin-wrapper {
color: inherit; color: inherit;
} }
@@ -77,8 +77,8 @@
} }
::-webkit-scrollbar { ::-webkit-scrollbar {
width: 8px; width: 6px;
height: 8px; height: 6px;
} }
::-webkit-scrollbar-track { ::-webkit-scrollbar-track {
@@ -91,13 +91,17 @@
::-webkit-scrollbar-thumb { ::-webkit-scrollbar-thumb {
background-color: rgba(var(--semi-grey-2), 1); background-color: rgba(var(--semi-grey-2), 1);
border-radius: 8px; border-radius: 6px;
} }
::-webkit-scrollbar-thumb:hover { ::-webkit-scrollbar-thumb:hover {
background-color: rgba(var(--semi-grey-3), 1); background-color: rgba(var(--semi-grey-3), 1);
} }
.menu::-webkit-scrollbar-thumb {
background-color: rgba(var(--semi-grey-4), 1);
}
.theme { .theme {
color: var(--semi-color-text-1); color: var(--semi-color-text-1);
background-color: var(--semi-color-bg-0); background-color: var(--semi-color-bg-0);