- Create Components folder under src folder
- Add CurrencySymbolsEXP.js file and add below Code
import React from "react";
import { StyleSheet, Platform, View, Text } from "react-native";
const CurrencySymbolsEXP = () => {
return (
<View style={styles.MainContainer}>
<Text>Currency Symbols example</Text>
<Text style={styles.text}> Doller = {"\u0024"} </Text>
<Text style={styles.text}> Rupees = {"\u20B9"} </Text>
<Text style={styles.text}> Euro = {"\u20AC"} </Text>
<Text style={styles.text}> Japanese yen = {"\u00A5"} </Text>
<Text style={styles.text}> Pound sterling = {"\u00A3"} </Text>
</View>
);
};
export default CurrencySymbolsEXP;
const styles = StyleSheet.create({
MainContainer: {
flex: 1,
paddingTop: Platform.OS === "ios" ? 20 : 0,
alignItems: "center",
justifyContent: "center"
},
text: {
color: "#000",
fontSize: 15
}
});
- Open App.js file and update code as below
import React from 'react';
import { Text,View,StyleSheet } from 'react-native';
import CurrencySymbolsEXP from './src/Component/CurrencySymbolsEXP'
const App=()=> {
return (
<View style={styles.container}>
<CurrencySymbolsEXP/>
</View>
);
}
export default App;
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
paddingTop:80
},
});
No comments:
Post a Comment