colorfy-software / react-native-modalfy

🥞 Modal citizen of React Native.
https://colorfy-software.gitbook.io/react-native-modalfy
MIT License
1.06k stars 41 forks source link

Pass UI elements instead of Modal Name #100

Closed adamsolomon1986 closed 1 year ago

adamsolomon1986 commented 1 year ago

Hello, Thanks for creating this awesome library.

Quick question: how can I pass UI elements to the modalfy() function instead of creating tons of modal screens at the very beginning and registering them in stack?

Environment:

React Native: 0.70 react-native-modalfy: Version 3.3.3

Desired behavior


import { modalfy } from 'react-native-modalfy'

openModal( <View style={{ width: Dimensions.get('window').width, top: 200, bottom: 0, height: 500, backgroundColor:"white", borderRadius: 12, alignSelf:'flex-end'}}>
    <Text>Your message was sent!</Text>
    <Button onPress={closeModal} title="OK" />
  </View>)
CharlesMangwa commented 1 year ago

hi @adamsolomon1986! thanks for the kind words!

regarding your question: unfortunately, this is not something modalfy offers nor plans to do in the foreseeable future. but just out of curiosity: why do you want this specific api? would having a regular "modalfy modal" that you can customize the content/style of via params not work for you? let me know!