RBSheet issue
Closed this issue · 3 comments
alihajjow commented
how to make the toast appears over the backdrop of the RBSheet
Abrar-Devs commented
You need to place the ToastManager component inside of the modal to show over the backdrop. Here's the code example:
import React from 'react'
import { StyleSheet, View, TouchableOpacity, Text } from 'react-native'
import ToastManager, { Toast } from 'toastify-react-native'
import Modal from 'react-native-modal'
const App = () => {
const showToasts = () => {
Toast.success('Promised is resolved')
}
return (
<View style={styles.container}>
<ToastManager textStyle={{ fontSize: 20, color: 'orange' }} />
<Modal isVisible={true}>
<View>
<Text>Inside modal</Text>
<TouchableOpacity
onPress={showToasts}
style={{
backgroundColor: 'white',
borderColor: 'green',
borderWidth: 1,
padding: 10,
}}
>
<Text>SHOW SOME AWESOMENESS!</Text>
</TouchableOpacity>
</View>
<ToastManager textStyle={{ fontSize: 20, color: 'orange' }} />
</Modal>
</View>
)
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
})
export default App
zahidalidev commented
Thanks @Abrar-Devs .
- This issue has beed resolved, so closing.
dcnc336 commented
Hi @zahidalidev , Can I reopen this issue? I wanted to concurrently show toastify alert on backdrop and modal, I implemented as above code for my app
I processed follow steps
- click button to show modal
- show toastify alert on modal
- close modal
After do it, toastify modal not showed on backdrop, I tried for two days, I can't fix this issues, please help me!