import { StyleSheet } from "react-native";
// Define a StyleSheet object to style the app components
const styles = StyleSheet.create({
// Main container of the screen
container: {
flex: 1, // Occupies full height
justifyContent: "center", // Centers content vertically
alignItems: "center", // Centers content horizontally
backgroundColor: "#f5f5f5" // Light grey background color
},
// Inner container that holds the converter UI
subcontainer: {
shadowColor: "rgba(0, 0, 0, 0.2)", // Shadow color for iOS
shadowOffset: {
width: 0, // No horizontal shadow
height: 6 // Vertical shadow
},
shadowOpacity: 1, // Full shadow opacity
shadowRadius: 15, // Shadow blur radius
elevation: 5, // Shadow elevation for Android
padding: 40, // Padding inside the container
borderRadius: 20, // Rounded corners
backgroundColor: "#ffffff" // White background
},
// Header title style
header: {
fontSize: 28, // Large font size
fontWeight: "bold", // Bold text
marginBottom: 20, // Space below the header
color: "green" // Text color
},
// Common wrapper for inputs and dropdowns
inputContainer: {
flexDirection: "row", // Layout children in a row
alignItems: "center", // Align children vertically centered
marginVertical: 10 // Vertical spacing
},
// Label text style
label: {
fontSize: 19, // Medium font size
marginRight: 10, // Space to the right of label
color: "#333", // Dark gray text color
fontFamily: "Pacifico" // Custom font for styling
},
// TextInput field style
input: {
flex: 1, // Occupies full horizontal space in its container
borderWidth: 1, // Border thickness
borderColor: "#ccc", // Light grey border color
borderRadius: 10, // Rounded input corners
paddingHorizontal: 10, // Left and right padding inside the input
height: 40, // Fixed height
color: "#333" // Text color
},
// Dropdown selector style
dropdown: {
width: 150, // Fixed width
height: 40, // Fixed height
borderWidth: 1, // Border width
borderColor: "#ccc", // Border color
borderRadius: 4, // Rounded corners
paddingHorizontal: 10, // Padding inside the dropdown
justifyContent: "center", // Center content vertically
color: "#333" // Dropdown text color
},
// Convert button style
convertButton: {
backgroundColor: "#007BFF", // Blue background
borderRadius: 4, // Rounded corners
paddingVertical: 12, // Top and bottom padding
paddingHorizontal: 24, // Left and right padding
marginTop: 20, // Space above the button
shadowColor: "rgba(0, 123, 255, 0.5)", // Shadow color
shadowOffset: {
width: 0, // No horizontal offset
height: 3 // Vertical shadow
},
shadowOpacity: 1, // Shadow visibility
shadowRadius: 15, // Shadow blur radius
elevation: 3 // Android elevation for shadow
},
// Text inside convert button
convertButtonText: {
color: "white", // White text
fontSize: 18, // Medium font size
fontWeight: "bold", // Bold text
textAlign: "center" // Center text horizontally
},
// Converted result text
result: {
marginTop: 20, // Space above the result
fontSize: 18, // Medium font
color: "#333" // Dark text color
},
// Style for the swap button (between currencies)
swapButton: {
backgroundColor: "#ddd", // Light grey background
borderRadius: 50, // Fully rounded button
width: 45, // Fixed width
height: 40, // Fixed height
justifyContent: "center", // Center content vertically
alignItems: "center", // Center content horizontally
marginBottom: 10 // Space below the button
},
// Swap icon text style
swapButtonText: {
fontSize: 30, // Large font size for swap icon
textAlign: "center", // Centered horizontally
color: "red", // Red color for emphasis
marginBottom: 10 // Additional spacing below
}
});
export { styles };