// Import StyleSheet from react-native for creating styles
import { StyleSheet } from 'react-native';
// Create a StyleSheet object containing all styles for the app
const styles = StyleSheet.create({
// Container for the main layout
container: {
flex: 1, // Take up the full screen
padding: 20, // Add padding around the content
backgroundColor: '#fff', // Set background color to white
},
// Style for the bill input section
billInput: {
marginBottom: 20, // Space below the input
},
// Style for the header text
header: {
flexDirection: 'row', // Arrange children in a row
alignItems: 'center', // Center items vertically
alignContent: 'center', // Center content vertically (for wrapping)
justifyContent: 'center', // Center items horizontally
alignSelf: 'center', // Center the header itself
fontSize: 30, // Large font size
fontWeight: 'bold', // Bold text
},
// General text style
text: {
fontSize: 16, // Medium font size
fontWeight: 'bold', // Bold text
paddingHorizontal: 5, // Horizontal padding
},
// Style for bill-related text
billText: {
fontSize: 16, // Medium font size
fontWeight: 'bold', // Bold text
paddingHorizontal: 10, // More horizontal padding
},
// Container for input fields
inputContainer: {
flexDirection: 'row', // Arrange children in a row
alignItems: 'center', // Center items vertically
},
// Style for text input fields
input: {
flex: 1, // Take up available space
borderColor: '#ccc', // Light gray border
borderWidth: 1, // Border width
padding: 10, // Padding inside input
borderRadius: 4, // Rounded corners
fontSize: 20, // Large font size
marginVertical: 10, // Vertical margin
},
// Container for tip selection buttons
tipContainer: {
flexDirection: 'row', // Arrange children in a row
flexWrap: 'wrap', // Allow wrapping to next line
justifyContent: 'space-between', // Space between buttons
marginBottom: 12, // Space below the container
},
// Style for individual tip button
tip: {
width: '30%', // Each button takes 30% width
backgroundColor: '#2395e2', // Blue background
borderRadius: 5, // Rounded corners
textAlign: 'center', // Center text
padding: 10, // Padding inside button
marginVertical: 5, // Vertical margin
alignContent: 'center', // Center content vertically (for wrapping)
alignItems: 'center', // Center items vertically
},
// Style for selected tip button
selected: {
backgroundColor: 'green', // Green background when selected
},
// Style for custom tip input
customTip: {
borderColor: '#ccc', // Light gray border
borderWidth: 1, // Border width
padding: 10, // Padding inside input
borderRadius: 4, // Rounded corners
fontSize: 16, // Medium font size
marginVertical: 10, // Vertical margin
},
// Style for number of people input
numberOfPeople: {
borderColor: '#ccc', // Light gray border
borderWidth: 1, // Border width
padding: 10, // Padding inside input
borderRadius: 4, // Rounded corners
fontSize: 16, // Medium font size
marginVertical: 10, // Vertical margin
},
// Style for the generate bill button
generateBillBtn: {
width: '100%', // Full width
height: 40, // Fixed height
backgroundColor: '#2395e2', // Blue background
borderRadius: 7, // Rounded corners
alignItems: 'center', // Center text horizontally
justifyContent: 'center', // Center text vertically
marginVertical: 16, // Vertical margin
},
// Style for the text inside the generate bill button
generateBillBtnText: {
color: 'white', // White text
fontSize: 16, // Medium font size
fontWeight: 'bold', // Bold text
},
// Style for the bill output section
billOutput: {
marginVertical: 15, // Vertical margin
padding: 20, // Padding inside output
backgroundColor: '#2395e2', // Blue background
borderRadius: 8, // Rounded corners
color: 'white', // White text
},
// Style for tip amount text
tipAmount: {
marginBottom: 10, // Space below
color: "white", // White text
fontWeight: "bold", // Bold text
},
// Style for tip label text
tipText: {
color: "white", // White text
fontWeight: "bold", // Bold text
},
// Style for total amount text
total: {
marginBottom: 10, // Space below
color: "white", // White text
fontWeight: "bold", // Bold text
},
// Style for value text (amounts)
value: {
color: "white", // White text
fontWeight: "bold", // Bold text
paddingLeft: 10, // Padding on the left
fontSize: 19, // Slightly larger font
},
// Style for each person's bill text
eachPersonBill: {
color: "white", // White text
fontWeight: "bold", // Bold text
},
// Style for the reset button
resetBtn: {
padding: 12, // Padding inside button
borderRadius: 5, // Rounded corners
backgroundColor: 'white', // White background
alignItems: 'center', // Center text horizontally
justifyContent: 'center', // Center text vertically
marginTop: 10, // Space above
},
// Style for the text inside the reset button
resetBtnText: {
color: 'black', // Black text
fontSize: 16, // Medium font size
fontWeight: 'bold', // Bold text
},
});
// Export the styles object for use in other files
export { styles }