NewDatasetCard.tsx 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. 'use client'
  2. import { forwardRef } from 'react'
  3. import { useTranslation } from 'react-i18next'
  4. import {
  5. RiAddLine,
  6. RiArrowRightLine,
  7. } from '@remixicon/react'
  8. const CreateAppCard = forwardRef<HTMLAnchorElement>((_, ref) => {
  9. const { t } = useTranslation()
  10. return (
  11. <div style={{backgroundColor:'rgba(255,255,255,.6)'}} className='flex flex-col bg-background-default-dimm border-[0.5px] border-components-panel-border rounded-xl
  12. min-h-[160px] transition-all duration-200 ease-in-out'
  13. >
  14. <a ref={ref} className='group flex flex-grow items-start p-4 cursor-pointer' href='/datasets/create'>
  15. <div className='flex items-center gap-3'>
  16. <div className='w-10 h-10 p-2 flex items-center justify-center border border-dashed border-divider-regular rounded-lg
  17. bg-background-default-lighter group-hover:border-solid group-hover:border-effects-highlight group-hover:bg-background-default-dodge'
  18. >
  19. <RiAddLine className='w-4 h-4 text-text-tertiary group-hover:text-text-accent'/>
  20. </div>
  21. <div className='system-md-semibold text-text-secondary group-hover:text-text-accent'>{t('dataset.createDataset')}</div>
  22. </div>
  23. </a>
  24. <div className='p-4 pt-0 text-text-tertiary system-xs-regular'>{t('dataset.createDatasetIntro')}</div>
  25. <a className='group flex p-4 items-center gap-1 border-t-[0.5px] border-divider-subtle rounded-b-xl cursor-pointer' href='/datasets/connect'>
  26. <div className='system-xs-medium text-text-tertiary group-hover:text-text-accent'>{t('dataset.connectDataset')}</div>
  27. <RiArrowRightLine className='w-3.5 h-3.5 text-text-tertiary group-hover:text-text-accent' />
  28. </a>
  29. </div>
  30. )
  31. })
  32. CreateAppCard.displayName = 'CreateAppCard'
  33. export default CreateAppCard