fix: choose tools

This commit is contained in:
Joel 2024-12-31 11:51:04 +08:00
parent 3a09f43f70
commit 3bed0346d7
3 changed files with 11 additions and 6 deletions

View File

@ -40,7 +40,7 @@ const SearchBox = ({
locale={locale}
/>
<div className='mx-1 w-[1px] h-3.5 bg-divider-regular'></div>
<div className='grow flex items-center p-1 pl-2'>
<div className='relative grow flex items-center p-1 pl-2'>
<div className='flex items-center mr-2 w-full'>
<input
className={cn(
@ -54,9 +54,11 @@ const SearchBox = ({
/>
{
search && (
<ActionButton onClick={() => onSearchChange('')}>
<RiCloseLine className='w-4 h-4' />
</ActionButton>
<div className='absolute right-2 top-1/2 -translate-y-1/2'>
<ActionButton onClick={() => onSearchChange('')}>
<RiCloseLine className='w-4 h-4' />
</ActionButton>
</div>
)
}
</div>

View File

@ -74,11 +74,13 @@ const List = ({
)
}
const maxWidthClassName = 'max-w-[300px]'
return (
<>
{hasRes && (
<div
className={cn('sticky z-10 flex justify-between h-8 px-4 py-1 text-text-primary system-sm-medium cursor-pointer', stickyClassName)}
className={cn('sticky z-10 flex justify-between h-8 px-4 py-1 text-text-primary system-sm-medium cursor-pointer', stickyClassName, maxWidthClassName)}
onClick={handleHeadClick}
>
<span>{t('plugin.fromMarketplace')}</span>
@ -93,7 +95,7 @@ const List = ({
</Link>
</div>
)}
<div className='p-1' ref={nextToStickyELemRef}>
<div className={cn('p-1', maxWidthClassName)} ref={nextToStickyELemRef}>
{list.map((item, index) => (
<Item
key={index}

View File

@ -68,6 +68,7 @@ const Tabs: FC<TabsProps> = ({
{
activeTab === TabsEnum.Tools && (
<AllTools
className='w-[315px]'
searchText={searchText}
onSelect={onSelect}
tags={tags}