add-model-button.tsx 738 B

1234567891011121314151617181920212223242526272829
  1. import type { FC } from 'react'
  2. import { useTranslation } from 'react-i18next'
  3. import { PlusCircle } from '@/app/components/base/icons/src/vender/solid/general'
  4. type AddModelButtonProps = {
  5. className?: string
  6. onClick: () => void
  7. }
  8. const AddModelButton: FC<AddModelButtonProps> = ({
  9. className,
  10. onClick,
  11. }) => {
  12. const { t } = useTranslation()
  13. return (
  14. <span
  15. className={`
  16. shrink-0 flex items-center px-1.5 h-6 text-xs font-medium text-gray-500 cursor-pointer
  17. hover:bg-primary-50 hover:text-primary-600 rounded-md ${className}
  18. `}
  19. onClick={onClick}
  20. >
  21. <PlusCircle className='mr-1 w-3 h-3' />
  22. {t('common.modelProvider.addModel')}
  23. </span>
  24. )
  25. }
  26. export default AddModelButton