fix: retrieval ui

pull/12097/head
Joel 1 year ago
parent 777bba0c63
commit 29c41bf8e8

@ -5,7 +5,6 @@ import {
} from '@remixicon/react' } from '@remixicon/react'
import Image from 'next/image' import Image from 'next/image'
import Button from '../../base/button' import Button from '../../base/button'
import Tag from '../../base/tag'
import { getIcon } from '../common/retrieval-method-info' import { getIcon } from '../common/retrieval-method-info'
import ModifyExternalRetrievalModal from './modify-external-retrieval-modal' import ModifyExternalRetrievalModal from './modify-external-retrieval-modal'
import Tooltip from '@/app/components/base/tooltip' import Tooltip from '@/app/components/base/tooltip'
@ -145,11 +144,11 @@ const TextAreaWithButton = ({
/> />
) )
} }
<div className='h-2 rounded-tl-xl rounded-tr-xl bg-white'></div> <div className='h-2 rounded-tl-xl rounded-tr-xl bg-background-default'></div>
</div> </div>
<div className='px-4 pb-11'> <div className='px-4 pb-11 bg-background-default rounded-b-xl'>
<textarea <textarea
className='h-[220px] border-none resize-none font-normal caret-primary-600 text-gray-700 text-sm w-full focus-visible:outline-none placeholder:text-gray-300 placeholder:text-sm placeholder:font-normal' className='h-[220px] border-none resize-none font-normal caret-primary-600 text-text-secondary text-sm w-full focus-visible:outline-none placeholder:text-gray-300 placeholder:text-sm placeholder:font-normal'
value={text} value={text}
onChange={handleTextChange} onChange={handleTextChange}
placeholder={t('datasetHitTesting.input.placeholder') as string} placeholder={t('datasetHitTesting.input.placeholder') as string}
@ -160,24 +159,23 @@ const TextAreaWithButton = ({
<Tooltip <Tooltip
popupContent={t('datasetHitTesting.input.countWarning')} popupContent={t('datasetHitTesting.input.countWarning')}
> >
<div> <div
<Tag color="red" className="!text-red-600"> className={cn('flex items-center h-5 px-1 rounded-md bg-background-section-burn text-red-600 text-xs font-medium', !text?.length && 'opacity-50')}
>
{text?.length} {text?.length}
<span className="text-red-300 mx-0.5">/</span> <span className="text-red-300 mx-0.5">/</span>
200 200
</Tag>
</div> </div>
</Tooltip> </Tooltip>
) )
: ( : (
<Tag <div
color="gray" className={cn('flex items-center h-5 px-1 rounded-md bg-background-section-burn text-text-tertiary text-xs font-medium', !text?.length && 'opacity-50')}
className={cn('!text-gray-500', text?.length ? '' : 'opacity-50')}
> >
{text?.length} {text?.length}
<span className="text-gray-300 mx-0.5">/</span> <span className="text-divider-deep mx-0.5">/</span>
200 200
</Tag> </div>
)} )}
<div> <div>
@ -186,6 +184,7 @@ const TextAreaWithButton = ({
variant="primary" variant="primary"
loading={loading} loading={loading}
disabled={(!text?.length || text?.length > 200)} disabled={(!text?.length || text?.length > 200)}
className='w-[88px]'
> >
{t('datasetHitTesting.input.testing')} {t('datasetHitTesting.input.testing')}
</Button> </Button>

Loading…
Cancel
Save