chore: sub variable trigger

This commit is contained in:
Joel
2024-08-21 11:07:13 +08:00
parent 9a23cd08d8
commit b3b87b3e4c
2 changed files with 8 additions and 9 deletions

View File

@ -6,7 +6,6 @@ import {
import { useTranslation } from 'react-i18next'
import { RiDeleteBinLine } from '@remixicon/react'
import produce from 'immer'
import { XMarkIcon } from '@heroicons/react/20/solid'
import type { VarType as NumberVarType } from '../../../tool/types'
import type {
Condition,
@ -170,12 +169,11 @@ const ConditionItem = ({
onSelect={item => handleSubVarKeyChange(item.value as string)}
renderTrigger={item => (
item
? <div className='flex items-center'>
<div className='flex px-1.5 items-center h-6 rounded-md border-[0.5px] border-components-panel-border-subtle bg-components-badge-white-to-dark shadow-xs text-text-accent'>
? <div className='flex justify-start cursor-pointer'>
<div className='inline-flex px-1.5 items-center h-6 rounded-md border-[0.5px] border-components-panel-border-subtle bg-components-badge-white-to-dark shadow-xs text-text-accent'>
<Variable02 className='w-3.5 h-3.5 text-text-accent' />
<div className='ml-0.5 system-xs-medium'>{item?.name}</div>
</div>
<XMarkIcon className='ml-0.5 w-3.5 h-3.5 text-gray-400' onClick={() => handleSubVarKeyChange('')} />
</div>
: <div className='text-gray-300 system-xs-medium'>{t('common.placeholder.select')}</div>
)}