瀏覽代碼

[ISSUE-1533] Update visible list in dropdown selector (#1540)

* Update visible list in dropdown select selector

* refactoring

* changed horizontal scrollbar

Co-authored-by: Anton Zorin <zorii4@Antons-MacBook-Pro.local>
Zorii4 3 年之前
父節點
當前提交
00bac4eded
共有 1 個文件被更改,包括 7 次插入2 次删除
  1. 7 2
      kafka-ui-react-app/src/components/common/Select/Select.styled.ts

+ 7 - 2
kafka-ui-react-app/src/components/common/Select/Select.styled.ts

@@ -59,17 +59,18 @@ export const OptionList = styled.ul`
   position: absolute;
   top: 100%;
   left: 0;
-  max-height: 114px;
+  max-height: 228px;
   margin-top: 4px;
   background-color: ${(props) => props.theme.select.backgroundColor.normal};
   border: 1px ${(props) => props.theme.select.borderColor.normal} solid;
   border-radius: 4px;
   font-size: 14px;
   line-height: 18px;
-  width: 100%;
   color: ${(props) => props.theme.select.color.normal};
   overflow-y: scroll;
   z-index: 10;
+  max-width: 300px;
+  min-width: 100%;
 
   &::-webkit-scrollbar {
     -webkit-appearance: none;
@@ -81,6 +82,10 @@ export const OptionList = styled.ul`
     background-color: ${(props) =>
       props.theme.select.optionList.scrollbar.backgroundColor};
   }
+
+  &::-webkit-scrollbar:horizontal {
+    height: 7px;
+  }
 `;
 
 export const Option = styled.li<OptionProps>`