index.tsx 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. 'use client'
  2. import React from 'react'
  3. import { useTranslation } from 'react-i18next'
  4. import s from './index.module.css'
  5. import cn from '@/utils/classnames'
  6. import Modal from '@/app/components/base/modal'
  7. import Button from '@/app/components/base/button'
  8. type IProps = {
  9. show: boolean
  10. onConfirm: () => void
  11. onHide: () => void
  12. }
  13. const StopEmbeddingModal = ({
  14. show = false,
  15. onConfirm,
  16. onHide,
  17. }: IProps) => {
  18. const { t } = useTranslation()
  19. const submit = () => {
  20. onConfirm()
  21. onHide()
  22. }
  23. return (
  24. <Modal
  25. isShow={show}
  26. onClose={onHide}
  27. className={cn(s.modal, '!max-w-[480px]', 'px-8')}
  28. >
  29. <div className={s.icon} />
  30. <span className={s.close} onClick={onHide} />
  31. <div className={s.title}>{t('datasetCreation.stepThree.modelTitle')}</div>
  32. <div className={s.content}>{t('datasetCreation.stepThree.modelContent')}</div>
  33. <div className='flex flex-row-reverse'>
  34. <Button className='w-24 ml-2' variant='primary' onClick={submit}>{t('datasetCreation.stepThree.modelButtonConfirm')}</Button>
  35. <Button className='w-24' onClick={onHide}>{t('datasetCreation.stepThree.modelButtonCancel')}</Button>
  36. </div>
  37. </Modal>
  38. )
  39. }
  40. export default StopEmbeddingModal