Browse Source

wip(desktop): progress

Adam 2 tháng trước cách đây
mục cha
commit
40572eeba4

+ 1 - 0
packages/ui/src/components/list.css

@@ -112,6 +112,7 @@
         padding: 4px 10px;
         align-items: center;
         color: var(--text-strong);
+        scroll-margin-top: 28px;
 
         /* text-14-medium */
         font-family: var(--font-family-sans);

+ 1 - 1
packages/ui/src/components/list.tsx

@@ -79,7 +79,7 @@ export function List<T>(props: ListProps<T> & { ref?: (ref: ListRef) => void })
       return
     }
     const element = scrollRef()?.querySelector(`[data-key="${active()}"]`)
-    element?.scrollIntoView({ block: "nearest", behavior: "smooth" })
+    element?.scrollIntoView({ block: "center", behavior: "smooth" })
   })
 
   const handleSelect = (item: T | undefined, index: number) => {