| | |
| | | |
| | | return ( |
| | | <div key={variable} className={cn(itemClassName, 'flex flex-col items-start gap-1 self-stretch')}> |
| | | <div className="flex w-full items-center justify-between"> |
| | | <label className={cn(fieldLabelClassName, 'system-sm-semibold text-text-secondary')} htmlFor={variable}> |
| | | <div className="flex justify-between items-center w-full"> |
| | | <label className={cn(fieldLabelClassName, 'text-text-secondary system-sm-semibold')} htmlFor={variable}> |
| | | {label[i18n.language] || label.en_US} |
| | | {required && <span className='ml-1 text-red-500'>*</span>} |
| | | </label> |
| | |
| | | href={'https://docs.dify.ai/guides/knowledge-base/external-knowledge-api-documentation' || '/'} |
| | | target='_blank' |
| | | rel='noopener noreferrer' |
| | | className='body-xs-regular flex items-center text-text-accent' |
| | | className='text-text-accent body-xs-regular flex items-center' |
| | | > |
| | | <RiBookOpenLine className='mr-1 h-3 w-3 text-text-accent' /> |
| | | <RiBookOpenLine className='w-3 h-3 text-text-accent mr-1' /> |
| | | {t('dataset.externalAPIPanelDocumentation')} |
| | | </a> |
| | | )} |
| | |
| | | } |
| | | |
| | | return ( |
| | | <form className={cn('flex flex-col items-start justify-center gap-4 self-stretch', className)}> |
| | | <form className={cn('flex flex-col justify-center items-start gap-4 self-stretch', className)}> |
| | | {formSchemas.map(formSchema => renderField(formSchema))} |
| | | </form> |
| | | ) |
| | | }) |
| | | |
| | | Form.displayName = 'Form' |
| | | |
| | | export default Form |