Skip to content

Commit

Permalink
feat(Modal): add ability to override default on close for modals
Browse files Browse the repository at this point in the history
  • Loading branch information
zouxuoz committed Oct 23, 2018
1 parent 73428ef commit f72fee1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/atoms/Modal/withModalState.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ const withModalState = (BaseComponent) => {
const { id } = this.props;

const props = {
...this.props,
onClose: () => modalContext.closeModal(id),
...this.props,
isOpen: modalContext.state[id] ? modalContext.state[id].isOpen : false,
args: modalContext.state[id] ? modalContext.state[id].args : undefined,
};
Expand Down

0 comments on commit f72fee1

Please sign in to comment.