Passing Dialog content

This commit is contained in:
okbel
2018-04-30 16:53:05 -03:00
parent 58108f257f
commit 691bfa4e30
4 changed files with 31 additions and 28 deletions
@@ -31,6 +31,7 @@ class ConfirmChangesDialog extends React.Component {
finish = () => {
this.clear();
this.props.closeDialog();
this.props.finish();
};
render() {
@@ -43,7 +44,6 @@ class ConfirmChangesDialog extends React.Component {
const totalSteps = React.Children.count(this.props.children);
if (i !== this.state.step) return;
return React.cloneElement(child, {
onChange: this.props.onChange,
goToNextStep: this.goToNextStep,
clear: this.clear,
cancel: this.cancel,
@@ -58,13 +58,9 @@ class ConfirmChangesDialog extends React.Component {
ConfirmChangesDialog.propTypes = {
children: PropTypes.node,
saveChanges: PropTypes.func,
closeDialog: PropTypes.func,
showDialog: PropTypes.bool,
onChange: PropTypes.func,
emailAddress: PropTypes.string,
username: PropTypes.string,
formData: PropTypes.object,
finish: PropTypes.func,
};
export default ConfirmChangesDialog;