1
0
mirror of https://github.com/kamranahmedse/developer-roadmap.git synced 2025-08-16 22:23:59 +02:00

fix: double scroll bar when searching (#5623)

* fix: double scroll bar when searching

* fix: use cn instead

---------

Co-authored-by: TuDHM <tudhm@ghn.vn>
Co-authored-by: Arik Chakma <arikchangma@gmail.com>
This commit is contained in:
Dương Hồ Minh Tú
2024-05-11 11:46:37 +07:00
committed by GitHub
parent d7978d39c9
commit 33c8528c1a

View File

@@ -17,6 +17,7 @@ import { ClipboardIcon } from '../ReactIcons/ClipboardIcon.tsx';
import { GuideIcon } from '../ReactIcons/GuideIcon.tsx'; import { GuideIcon } from '../ReactIcons/GuideIcon.tsx';
import { HomeIcon } from '../ReactIcons/HomeIcon.tsx'; import { HomeIcon } from '../ReactIcons/HomeIcon.tsx';
import { VideoIcon } from '../ReactIcons/VideoIcon.tsx'; import { VideoIcon } from '../ReactIcons/VideoIcon.tsx';
import { cn } from '../../lib/classname.ts';
export type PageType = { export type PageType = {
id: string; id: string;
@@ -190,7 +191,7 @@ export function CommandMenu() {
return ( return (
<div className="fixed left-0 right-0 top-0 z-50 flex h-full justify-center overflow-y-auto overflow-x-hidden bg-black/50"> <div className="fixed left-0 right-0 top-0 z-50 flex h-full justify-center overflow-y-auto overflow-x-hidden bg-black/50">
<div className="relative top-0 h-full w-full max-w-lg p-2 sm:top-20 md:h-auto"> <div className="relative top-0 h-full w-full max-w-lg p-2 sm:mt-20 md:h-auto">
<div className="relative rounded-lg bg-white shadow" ref={modalRef}> <div className="relative rounded-lg bg-white shadow" ref={modalRef}>
<input <input
ref={inputRef} ref={inputRef}
@@ -245,9 +246,10 @@ export function CommandMenu() {
<div className="border-b border-gray-100"></div> <div className="border-b border-gray-100"></div>
)} )}
<a <a
className={`flex w-full items-center rounded p-2 text-sm ${ className={cn(
counter === activeCounter ? 'bg-gray-100' : '' 'flex w-full items-center rounded p-2 text-sm',
}`} counter === activeCounter ? 'bg-gray-100' : '',
)}
onMouseOver={() => setActiveCounter(counter)} onMouseOver={() => setActiveCounter(counter)}
href={page.url} href={page.url}
> >