We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I created a Modal component in React Native and exported it to the local host and below shown is how I got the preview.
Modal
react-native-modal
This is how it should usually show
import React from 'react'; import { StyleSheet, Text, TouchableOpacity, TouchableOpacityProps, View, } from 'react-native'; import Modal from 'react-native-modal'; interface forceupdateProps extends TouchableOpacityProps { visible: boolean; btnColor?: string; onPress: () => void; } const forceupdate = ({visible, onPress, btnColor}: forceupdateProps) => { return ( <View style={{flex: 1}}> <Modal backdropOpacity={0.3} isVisible={visible}> <View style={styles.modalContainer}> <View style={styles.container}> <Text style={styles.headerText}>Update Available!</Text> <Text style={styles.contentText}> A new version of the app is available. Please update the app </Text> <TouchableOpacity style={[ styles.btnContainer, btnColor ? {backgroundColor: btnColor} : null, ]} onPress={onPress}> <Text style={styles.btnText}>Update</Text> </TouchableOpacity> </View> </View> </Modal> </View> ); }; export default forceupdate; const styles = StyleSheet.create({ modalContainer: { flex: 1, justifyContent: 'center', alignItems: 'center', }, container: { backgroundColor: '#fff', marginHorizontal: 20, padding: 10, paddingHorizontal: 20, borderRadius: 10, alignItems: 'center', }, headerText: { fontWeight: 'bold', fontSize: 22, marginBottom: 10, }, contentText: { textAlign: 'center', fontSize: 14, marginBottom: 20, }, btnContainer: { backgroundColor: '#555555', paddingVertical: 10, paddingHorizontal: 30, borderRadius: 10, }, btnText: { color: '#fff', fontWeight: 'bold', fontSize: 16, }, });
The text was updated successfully, but these errors were encountered:
this is resolved in the updated-component overview feature you can read more here - #7504
currently it's not on by default, will likely be defautl on bit2.0
Sorry, something went wrong.
No branches or pull requests
I created a
Modal
component in React Native and exported it to the local host and below shown is how I got the preview.Steps to Reproduce
Modal
orreact-native-modal
Expected Behavior
This is how it should usually show
Code of the Component
Specifications
The text was updated successfully, but these errors were encountered: