-
Notifications
You must be signed in to change notification settings - Fork 295
/
WalletCreateDialog.tsx
49 lines (44 loc) · 1.35 KB
/
WalletCreateDialog.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// @flow
import React, { Component } from 'react';
import type { Node } from 'react';
import { defineMessages, intlShape } from 'react-intl';
import DialogCloseButton from '../../widgets/DialogCloseButton';
import Dialog from '../../widgets/Dialog';
import WalletCreateSteps from './WalletCreateSteps';
import styles from './WalletCreateDialog.scss';
import type { DialogActionItems } from '../../widgets/Dialog';
const messages = defineMessages({
dialogTitle: {
id: 'wallet.create.dialog.title',
defaultMessage: '!!!Create a new wallet',
description: 'Title "Create a new wallet" in the wallet create form.',
},
});
type Props = {
stepNumber: number,
actions?: DialogActionItems,
onClose?: Function,
children: Node,
};
export default class WalletCreateDialog extends Component<Props> {
static contextTypes = {
intl: intlShape.isRequired,
};
render() {
const { intl } = this.context;
const { actions, children, stepNumber, onClose } = this.props;
return (
<Dialog
className={styles.component}
title={intl.formatMessage(messages.dialogTitle)}
actions={actions}
closeOnOverlayClick
onClose={onClose}
closeButton={<DialogCloseButton />}
>
<WalletCreateSteps stepNumber={stepNumber} />
<div className={styles.content}>{children}</div>
</Dialog>
);
}
}