Test app
This commit is contained in:
21
components/MyText.js
Normal file
21
components/MyText.js
Normal file
@@ -0,0 +1,21 @@
|
||||
import React from 'react';
|
||||
import { Text, StyleSheet, TouchableOpacity } from 'react-native';
|
||||
|
||||
const MyText = ({ yournameherefromprops, onPress }) => {
|
||||
return (
|
||||
<TouchableOpacity onPress={onPress}>
|
||||
<Text style={styles.redText}>
|
||||
Hello, {yournameherefromprops}
|
||||
</Text>
|
||||
</TouchableOpacity>
|
||||
);
|
||||
};
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
redText: {
|
||||
color: 'red',
|
||||
fontSize: 24,
|
||||
},
|
||||
});
|
||||
|
||||
export default MyText;
|
||||
Reference in New Issue
Block a user