mango-v4-ui/components/modals/SwapIntroModal.tsx

40 lines
1.3 KiB
TypeScript
Raw Normal View History

2023-03-05 16:34:54 -08:00
import Button from '@components/shared/Button'
2023-10-29 21:53:18 -07:00
import { ArrowsRightLeftIcon, CheckCircleIcon } from '@heroicons/react/20/solid'
2023-03-02 09:02:26 -08:00
import { ModalProps } from '../../types/modal'
import Modal from '../shared/Modal'
2023-03-05 16:34:54 -08:00
import { useTranslation } from 'next-i18next'
2023-03-02 09:02:26 -08:00
const SwapIntroModal = ({ isOpen, onClose }: ModalProps) => {
2023-03-05 16:34:54 -08:00
const { t } = useTranslation(['common', 'swap'])
2023-03-02 09:02:26 -08:00
return (
<Modal isOpen={isOpen} onClose={onClose}>
2023-10-29 21:53:18 -07:00
<div className="flex flex-col items-center">
<div className="mb-1 flex h-10 w-10 items-center justify-center rounded-full bg-th-bkg-3">
<ArrowsRightLeftIcon className="h-6 w-6 text-th-active" />
2023-03-02 09:02:26 -08:00
</div>
2023-10-29 21:53:18 -07:00
<h2>{t('swap:mango-swap')}</h2>
2023-03-02 09:02:26 -08:00
</div>
2023-10-29 21:53:18 -07:00
<ul>
<ListItem desc={t('swap:swap-into-1')} />
<ListItem desc={t('swap:swap-into-2')} />
<ListItem desc={t('swap:swap-into-3')} />
<ListItem desc={t('swap:swap-into-4')} />
</ul>
<Button className="mt-6 w-full" onClick={onClose}>
{t('get-started')}
</Button>
2023-03-02 09:02:26 -08:00
</Modal>
)
}
export default SwapIntroModal
2023-03-05 16:34:54 -08:00
const ListItem = ({ desc }: { desc: string }) => {
return (
2023-03-05 19:21:15 -08:00
<li className="mt-3 flex items-start">
2023-10-29 21:53:18 -07:00
<CheckCircleIcon className="mr-1.5 mt-[1px] h-5 w-5 flex-shrink-0 text-th-up " />
<span className="text-th-fgd-2 md:text-base md:leading-snug">{desc}</span>
2023-03-05 16:34:54 -08:00
</li>
)
}