0.0.48 • Published 1 year ago
react-native-currency-converter v0.0.48
react-native-currency-converter
Overview
The CurrencyConverter is a React Native library that provides a simple and customizable currency converter component. It allows users to convert between US Dollars (USD) and Indian Rupees (INR). The component is highly customizable through props, allowing you to tailor its appearance and behavior to fit your application's needs.
Features
- Convert between USD and INR.
- Customizable styles for container, header, inputs, and buttons.
- Adjustable exchange rate.
Usage
import CurrencyConverter from 'react-native-currency-converter';const App = () => {
return (
<SafeAreaView style={styles.container}>
<CurrencyConverter
containerStyle={styles.customContainer}
headerStyle={styles.customHeader}
inputStyle={styles.customInput}
buttonStyle={styles.customButton}
buttonTextStyle={styles.customButtonText}
exchangeRate={80}
/>
</SafeAreaView>
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
},
customContainer: {
backgroundColor: 'gray',
color: 'black',
borderRadius: 30,
width: 300,
},
customHeader: {
color: 'black',
alignSelf: 'center',
marginVertical: 10,
},
customInput: {
marginVertical: 20,
borderRadius: 10,
},
customButton: {
marginVertical: 20,
borderRadius: 10,
},
customButtonText: {
color: '#fff',
},
});Installation
You can install the CurrencyConverter library via npm:
npm install react-native-currency-converter