Closed gadjevb closed 6 years ago
Requested changes are made.
Can you consider modal to be opened with a flag like RN Modal there are some cases when you can't use trigger or refs?
Do we have cases with such usages ?
Actually yes at least when I was migrating activate assets modal there should be opened when a specific error occurred so I can't use a trigger or can't call ref from the reducer. At least that's the way I could solve this so I change the modal in my PR (please have a look https://github.com/clouway/telcong.wss/pull/539/files#diff-674edb0335cb7e016ff6c534ecfa05bdR58)
return React.cloneElement(child, {
onPress: () => {
if (typeof onPressCall === 'function') {
if (onPressCall.then !== undefined) {
onPressCall()
.then(result => {
this.props.onShowDialog()
return Promise.resolve(result)
})
.catch(error => {
return Promise.reject(error)
})
} else {
onPressCall()
this.props.onShowDialog()
}
} else {
this.props.onShowDialog()
}
}
})
PR is rebased and integrated into storybook. Should opening with flag be implemented?
Write README.md with description.
Flag for opening the modal is included.
I'm not able to hide the StatusBar, I think it's a bug with react native. Here's some more info: https://github.com/facebook/react-native/issues/7474 - Issue about the problem. https://github.com/facebook/react-native/pull/18004 - PR for the issue opened 3 days ago.
Ok, as it's just for the example we can live with that for now.
Ready for a review!
All requested changes are fixed.
@mgenov requested changes are fixed.
Integration of a simple modal component in the native part, so it can be later reused in the different apps.
Fixes #16![modaldemo](https://user-images.githubusercontent.com/19385077/36425808-ae105e6a-1650-11e8-9022-75a38c962187.gif)