Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RBSheet issue #10

Closed
alihajjow opened this issue Mar 15, 2023 · 3 comments
Closed

RBSheet issue #10

alihajjow opened this issue Mar 15, 2023 · 3 comments

Comments

@alihajjow
Copy link

how to make the toast appears over the backdrop of the RBSheet

@Abrar-Devs
Copy link

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
Copy link
Owner

Thanks @Abrar-Devs .

  • This issue has beed resolved, so closing.

@dcnc336
Copy link

dcnc336 commented Nov 12, 2023

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants