JSPM

react-native-cn-popup-modal

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q13453F
  • License ISC

React native made popup modal plugin.

Package Exports

  • react-native-cn-popup-modal

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-native-cn-popup-modal) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

React-Native-popup-modal

Usage

<Root>
    <View>
        <TouchableOpacity
            onPress={() =>
              Popup.show({
              type: 'Survey', // Success, Survey, Danger, Warning
              /* image: require('./logo.png'), */  // optional
              title: 'New Survey',
              button: true,
              closebutton: true,
              closebuttonText: 'Close', // Default Close
              textBody: 'Would you like to participate in our survey ?',
              buttonText: 'Take the Survey',
              closeBtn: () => Popup.hide(),
              callback: () => {
                navigation.navigate("BusTime"),
                Popup.hide()
              }
            })
            }
        >
            <Text>Open Popup</Text>
        </TouchableOpacity>
    </View>
</Root>

Toast component

<Root>
    <View>
        <TouchableOpacity
            onPress={() => 
                    Toast.show({
                        type: 'Success', // Success, Warning, Danger
                        title: 'User created',
                        text: 'Your user was successfully created, use the app now.',
                        color: '#2ecc71'
                    })
          >
            <Text>Open Toast</Text>
        </TouchableOpacity>
    </View>
</Root>