Reputation: 87
I installed react-native-popup-dialog and I use it. I get the same warn when I enter the page with the component or when I open the popup dialog. Can you help me?
The error: "Warning: Failed prop type: Prop 'children' has type 'any' or 'mixed', but was not provided to 'PopupDialog'. Pass undefined or any other value"
<Dialog
visible = {this.state.addVisible}
rounded
width = {0.85}
dialogAnimation={new SlideAnimation({
slideFrom: 'bottom',
})}
footer = {
<DialogFooter>
<DialogButton
onPress = {() => {}}
textStyle = {styles.buttonText}
text = "Add"
/>
<DialogButton
onPress = {() => this.setState({addVisible: false})}
textStyle = {styles.buttonText}
text = "Cancel"
/>
</DialogFooter>
}
>
</Dialog>
Upvotes: 0
Views: 799
Reputation: 2702
According to issues:
It's type warning.
children
is required forDialogContent
component.
Please add that like this:
<Dialog
visible={this.state.visible}
onTouchOutside={() => {
this.setState({ visible: false });
}}
>
<DialogContent>
{...}
</DialogContent>
</Dialog>
Upvotes: 1