22 lines
443 B
JavaScript
22 lines
443 B
JavaScript
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;
|