// Import the StyleSheet module 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 style for the main layout
container: {
flex: 1, // Take up the full available space
padding: 16, // Add padding inside the container
backgroundColor: "#f0f0f0", // Set background color
},
// Style for the main title text
title: {
fontSize: 25, // Set font size
fontWeight: "bold", // Make text bold
marginBottom: 10, // Space below the title
textAlign: "center", // Center the text
color: "#333", // Set text color
margin: 10, // Margin on all sides
paddingTop: 30, // Padding at the top
},
// Style for each section/card
section: {
marginBottom: 16, // Space below the section
backgroundColor: "#fff", // Section background color
padding: 20, // Padding inside the section
borderRadius: 5, // Rounded corners
borderWidth: 1, // Border width
borderColor: "#ced4da", // Border color
shadowColor: "grey", // Shadow color (iOS)
shadowOffset: {
width: 0, // Shadow offset horizontally
height: 6, // Shadow offset vertically
},
shadowOpacity: 1, // Shadow opacity (iOS)
shadowRadius: 15, // Shadow blur radius (iOS)
elevation: 5, // Shadow elevation (Android)
},
// Style for labels
label: {
fontSize: 16, // Font size
marginBottom: 8, // Space below the label
color: "#333", // Text color
},
// Style for input fields
input: {
borderColor: "#ced4da", // Border color
borderWidth: 1, // Border width
borderRadius: 4, // Rounded corners
padding: 8, // Padding inside input
marginBottom: 8, // Space below input
fontSize: 16, // Font size
color: "#333", // Text color
},
// Style for headers
header: {
fontSize: 18, // Font size
fontWeight: "bold", // Bold text
marginBottom: 10, // Space below header
textAlign: "center", // Center the text
color: "#333", // Text color
},
// Style for the list container
list: {
maxHeight: 200, // Maximum height for the list
},
// Style for the list header row
listHeader: {
flexDirection: "row", // Arrange children in a row
justifyContent: "space-between", // Space between items
borderBottomWidth: 1, // Bottom border width
borderColor: "#ccc", // Border color
marginBottom: 10, // Space below header
paddingBottom: 10, // Padding below header
},
// Style for each list item row
listItem: {
flexDirection: "row", // Arrange children in a row
justifyContent: "space-between", // Space between items
borderBottomWidth: 1, // Bottom border width
borderColor: "#ccc", // Border color
marginBottom: 8, // Space below item
paddingBottom: 8, // Padding below item
},
// Style for GPA display
gpa: {
fontSize: 20, // Font size
fontWeight: "bold", // Bold text
marginTop: 10, // Space above GPA
textAlign: "center", // Center the text
color: "#333", // Text color
},
// Style for the add button
addButton: {
padding: 9.5, // Padding inside button
backgroundColor: "#fff", // Button background color
color: "#1d9bf0", // Text color
borderWidth: 1, // Border width
borderColor: "#1d9bf0", // Border color
borderRadius: 4, // Rounded corners
fontWeight: "bold", // Bold text
transition: "0.5s all", // Transition effect (not supported in React Native)
textAlign: "center", // Center the text
alignContent: "center", // Align content vertically
alignItems: "center", // Align items horizontally
justifyContent: "center", // Center content
},
// Style for add button when hovered (not supported in React Native)
addButtonHover: {
color: "white", // Text color on hover
backgroundColor: "#1d9bf0", // Background color on hover
borderColor: "#1d9bf0", // Border color on hover
borderWidth: 1, // Border width on hover
},
// Style for delete button
deletebtn: {
padding: 9.5, // Padding inside button
color: "#1d9bf0", // Text color
fontWeight: "bold", // Bold text
textAlign: "center", // Center the text
backgroundColor: "red", // Button background color
borderRadius: 15, // Rounded corners
},
// Style for delete button text
deletebtntext: {
color: "white", // Text color
},
// Style for picker component
picker: {
fontSize: 16, // Font size
paddingVertical: 12, // Vertical padding
paddingHorizontal: 10, // Horizontal padding
borderWidth: 1, // Border width
borderColor: "gray", // Border color
borderRadius: 4, // Rounded corners
color: "black", // Text color
paddingRight: 30, // Padding on the right
},
});
// Export the styles object for use in other files
export { styles };