Browse Source

优化Select component

PaRaD1SE98 1 year ago
parent
commit
960aa90c32
2 changed files with 3 additions and 6 deletions
  1. 1 1
      app/components/ui-lib.module.scss
  2. 2 5
      app/components/ui-lib.tsx

+ 1 - 1
app/components/ui-lib.module.scss

@@ -209,6 +209,7 @@
   max-width: fit-content;
   
   .select-with-icon-select {
+    height: 100%;
     border: var(--border-in-light);
     padding: 10px 25px 10px 10px;
     border-radius: 10px;
@@ -217,7 +218,6 @@
     background-color: var(--white);
     color: var(--black);
     text-align: center;
-    position: relative;
   }
 
   .select-with-icon-icon {

+ 2 - 5
app/components/ui-lib.tsx

@@ -254,11 +254,8 @@ export function Select(
 ) {
   const { className, children, ...otherProps } = props;
   return (
-    <div className={styles["select-with-icon"]}>
-      <select
-        className={`${styles["select-with-icon-select"]} ${className}`}
-        {...otherProps}
-      >
+    <div className={`${styles["select-with-icon"]} ${className}`}>
+      <select className={styles["select-with-icon-select"]} {...otherProps}>
         {children}
       </select>
       <DownIcon className={styles["select-with-icon-icon"]} />