Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
gnapse committed Dec 18, 2017
1 parent 3ca96f8 commit 1370879
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/components/modal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,15 @@ const mapDispatchToProps = dispatch => ({
export default connect(undefined, mapDispatchToProps)(MyFancyPage);
```

The modal component will receive a `hide` callback as a prop, that when called, will dismiss the
modal. It is your responsibility to make sure your modal calls this callback in order to go away.
The modal component will receive these props in relation to this module:

- `hide: PropTypes.func.isRequired`: a callback that, when invoked, will dismiss
the modal off the screen. It is your responsibility to call this callback from
within your modal accordingly.
- `open: PropTypes.bool.isRequired`: a boolean that indicates wether the modal
is considered to be open, and therefore being showed on the screen. For
instance, you could use id to pass id on to the material-ui `Dialog` component
to indicate that is open or not.

## Confirm and alert modals

Expand Down

0 comments on commit 1370879

Please sign in to comment.