| | |
| | | const { t } = useTranslation() |
| | | |
| | | return ( |
| | | <div className='group relative rounded-lg bg-components-input-bg-normal px-2.5 py-2 hover:shadow-xs'> |
| | | <div className='relative px-2.5 py-2 rounded-lg bg-white border-[0.5px] border-gray-200 hover:shadow-xs group'> |
| | | <div className='flex justify-between'> |
| | | <div className='flex items-center'> |
| | | <Variable02 className='h-3.5 w-3.5 text-text-accent-secondary' /> |
| | | <div className='ml-1 text-[13px] font-medium text-text-primary'>{payload.name}</div> |
| | | <div className='ml-2 text-xs font-normal capitalize text-text-tertiary'>{payload.type}</div> |
| | | <Variable02 className='w-3.5 h-3.5 text-primary-500' /> |
| | | <div className='ml-1 text-[13px] font-medium text-gray-900'>{payload.name}</div> |
| | | <div className='ml-2 text-xs font-normal text-gray-500 capitalize'>{payload.type}</div> |
| | | </div> |
| | | {payload.required && ( |
| | | <div className='text-xs font-normal uppercase leading-4 text-text-tertiary'>{t(`${i18nPrefix}.addExtractParameterContent.required`)}</div> |
| | | <div className='uppercase leading-4 text-xs font-normal text-gray-500'>{t(`${i18nPrefix}.addExtractParameterContent.required`)}</div> |
| | | )} |
| | | </div> |
| | | <div className='mt-0.5 text-xs font-normal leading-[18px] text-text-tertiary'>{payload.description}</div> |
| | | <div className='mt-0.5 leading-[18px] text-xs font-normal text-gray-500'>{payload.description}</div> |
| | | <div |
| | | className='absolute right-0 top-0 hidden h-full w-[119px] items-center justify-end space-x-1 rounded-lg bg-gradient-to-l from-components-panel-on-panel-item-bg to-background-gradient-mask-transparent pr-1 group-hover:flex' |
| | | className='group-hover:flex absolute top-0 right-1 hidden h-full items-center w-[119px] justify-end space-x-1 rounded-lg' |
| | | style={{ |
| | | background: 'linear-gradient(270deg, #FFF 49.99%, rgba(255, 255, 255, 0.00) 98.1%)', |
| | | }} |
| | | > |
| | | <div |
| | | className='cursor-pointer rounded-md p-1 hover:bg-state-base-hover' |
| | | className='p-1 cursor-pointer rounded-md hover:bg-black/5' |
| | | onClick={onEdit} |
| | | > |
| | | <RiEditLine className='h-4 w-4 text-text-tertiary' /> |
| | | <RiEditLine className='w-4 h-4 text-gray-500' /> |
| | | </div> |
| | | |
| | | <div |
| | | className='group shrink-0 cursor-pointer rounded-md p-1 hover:!bg-state-destructive-hover' |
| | | className='p-1 cursor-pointer rounded-md hover:bg-black/5' |
| | | onClick={onDelete} |
| | | > |
| | | <RiDeleteBinLine className='h-4 w-4 text-text-tertiary group-hover:text-text-destructive' /> |
| | | <RiDeleteBinLine className='w-4 h-4 text-gray-500' /> |
| | | </div> |
| | | </div> |
| | | </div> |