mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-14 05:16:00 +08:00

Co-authored-by: StyleZhang <jasonapring2015@outlook.com> Co-authored-by: Garfield Dai <dai.hai@foxmail.com> Co-authored-by: chenhe <guchenhe@gmail.com> Co-authored-by: jyong <jyong@dify.ai> Co-authored-by: Joel <iamjoel007@gmail.com> Co-authored-by: Yeuoly <admin@srmxy.cn>
30 lines
738 B
TypeScript
30 lines
738 B
TypeScript
import type { FC } from 'react'
|
|
import { useTranslation } from 'react-i18next'
|
|
import { PlusCircle } from '@/app/components/base/icons/src/vender/solid/general'
|
|
|
|
type AddModelButtonProps = {
|
|
className?: string
|
|
onClick: () => void
|
|
}
|
|
const AddModelButton: FC<AddModelButtonProps> = ({
|
|
className,
|
|
onClick,
|
|
}) => {
|
|
const { t } = useTranslation()
|
|
|
|
return (
|
|
<span
|
|
className={`
|
|
shrink-0 flex items-center px-1.5 h-6 text-xs font-medium text-gray-500 cursor-pointer
|
|
hover:bg-primary-50 hover:text-primary-600 rounded-md ${className}
|
|
`}
|
|
onClick={onClick}
|
|
>
|
|
<PlusCircle className='mr-1 w-3 h-3' />
|
|
{t('common.modelProvider.addModel')}
|
|
</span>
|
|
)
|
|
}
|
|
|
|
export default AddModelButton
|