mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-05-29 17:45:12 +08:00

Co-authored-by: NFish <douxc512@gmail.com> Co-authored-by: zxhlyh <jasonapring2015@outlook.com> Co-authored-by: twwu <twwu@dify.ai> Co-authored-by: jZonG <jzongcode@gmail.com>
33 lines
883 B
TypeScript
33 lines
883 B
TypeScript
import { useTranslation } from 'react-i18next'
|
|
import {
|
|
RiErrorWarningFill,
|
|
} from '@remixicon/react'
|
|
import { CheckCircle } from '@/app/components/base/icons/src/vender/solid/general'
|
|
|
|
export const ValidatedErrorIcon = () => {
|
|
return <RiErrorWarningFill className='h-4 w-4 text-[#D92D20]' />
|
|
}
|
|
|
|
export const ValidatedSuccessIcon = () => {
|
|
return <CheckCircle className='h-4 w-4 text-[#039855]' />
|
|
}
|
|
|
|
export const ValidatingTip = () => {
|
|
const { t } = useTranslation()
|
|
return (
|
|
<div className={'mt-2 text-xs font-normal text-primary-600'}>
|
|
{t('common.provider.validating')}
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export const ValidatedErrorMessage = ({ errorMessage }: { errorMessage: string }) => {
|
|
const { t } = useTranslation()
|
|
|
|
return (
|
|
<div className={'mt-2 text-xs font-normal text-[#D92D20]'}>
|
|
{t('common.provider.validatedError')}{errorMessage}
|
|
</div>
|
|
)
|
|
}
|