accounts-frontend/packages/app/components/contact/SuccessContactFormPopup.tsx
ErickSkrauch 82abe0a746
Extract general popups markup to its own component
Split popups controllers into separate components
Implemented storybooks for all project's popups
2020-07-06 19:29:56 +03:00

39 lines
1.3 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import React, { ComponentProps, ComponentType } from 'react';
import { FormattedMessage as Message } from 'react-intl';
import Popup from 'app/components/ui/popup';
import { Button } from 'app/components/ui/form';
import styles from './contactForm.scss';
interface Props {
email: string;
onClose?: ComponentProps<typeof Popup>['onClose'];
}
const SuccessContactFormPopup: ComponentType<Props> = ({ email, onClose }) => (
<Popup
title={<Message key="title" defaultMessage="Feedback form" />}
wrapperClassName={styles.successStateBoundings}
onClose={onClose}
data-testid="feedbackPopup"
>
<div className={styles.successBody}>
<span className={styles.successIcon} />
<div className={styles.successDescription}>
<Message
key="youMessageReceived"
defaultMessage="Your message was received. We will respond to you shortly. The answer will come to your Email:"
/>
</div>
<div className={styles.sentToEmail}>{email}</div>
</div>
<div className={styles.footer}>
<Button label={<Message key="close" defaultMessage="Close" />} block onClick={onClose} />
</div>
</Popup>
);
export default SuccessContactFormPopup;