contribute.tsx 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. 'use client'
  2. import type { FC } from 'react'
  3. import React from 'react'
  4. import { useTranslation } from 'react-i18next'
  5. import {
  6. RiHammerFill,
  7. } from '@remixicon/react'
  8. import { Heart02 } from '@/app/components/base/icons/src/vender/solid/education'
  9. import { BookOpen01 } from '@/app/components/base/icons/src/vender/line/education'
  10. import { ArrowUpRight } from '@/app/components/base/icons/src/vender/line/arrows'
  11. const Contribute: FC = () => {
  12. const { t } = useTranslation()
  13. return (
  14. <a
  15. href='https://github.com/langgenius/dify/blob/main/api/core/tools/README.md'
  16. target='_blank'
  17. rel='noopener noreferrer'
  18. className="group flex col-span-1 bg-white bg-cover bg-no-repeat bg-[url('~@/app/components/tools/provider/grid_bg.svg')] border-2 border-solid border-transparent rounded-xl shadow-sm min-h-[160px] flex-col transition-all duration-200 ease-in-out cursor-pointer hover:shadow-lg"
  19. >
  20. <div className='flex pt-[14px] px-[14px] pb-3 h-[66px] items-center gap-3 grow-0 shrink-0'>
  21. <div className='relative shrink-0 flex items-center'>
  22. <div className='z-10 flex p-3 rounded-[10px] bg-white border-[0.5px] border-primary-100 shadow-md'><RiHammerFill className='w-4 h-4 text-primary-600'/></div>
  23. <div className='-translate-x-2 flex p-3 rounded-[10px] bg-[#FEF6FB] border-[0.5px] border-[#FCE7F6] shadow-md'><Heart02 className='w-4 h-4 text-[#EE46BC]'/></div>
  24. </div>
  25. </div>
  26. <div className='mb-3 px-[14px] text-[15px] leading-5 font-semibold'>
  27. <div className='text-gradient'>{t('tools.contribute.line1')}</div>
  28. <div className='text-gradient'>{t('tools.contribute.line2')}</div>
  29. </div>
  30. <div className='px-4 py-3 border-t-[0.5px] border-black/5 flex items-center space-x-1 text-[#155EEF]'>
  31. <BookOpen01 className='w-3 h-3' />
  32. <div className='grow leading-[18px] text-xs font-normal'>{t('tools.contribute.viewGuide')}</div>
  33. <ArrowUpRight className='w-3 h-3' />
  34. </div>
  35. </a>
  36. )
  37. }
  38. export default React.memo(Contribute)