some clean up and work on the budget screen

This commit is contained in:
thschleicher 2023-12-23 13:55:57 +01:00 committed by Jakob Stornig
parent ef90c4ee1a
commit 7c165fb691
3 changed files with 64 additions and 66 deletions

View file

@ -1,4 +1,4 @@
import { ColorValue, StyleSheet, View } from "react-native";
import { ColorValue, StyleSheet, Text, View } from "react-native";
import { useThemeColor } from "../../hooks/useThemeColor";
import CustomCard from "../common/CustomCard";
@ -15,10 +15,9 @@ const CategoryItem = (properties: CategoryItemProps) => {
return (
<CustomCard>
< View style={[styles.textSection, {backgroundColor: backgroundColor}]}>
<View style={[styles.colorTip, {backgroundColor: properties.color}]}></View>
<View style={[styles.textSection, {backgroundColor: backgroundColor}]}>
<Text style={[styles.textSection, {color: textColor}]}>{properties.category}</Text>
</View>
@ -32,18 +31,23 @@ const CategoryItem = (properties: CategoryItemProps) => {
export default CategoryItem;
const styles = StyleSheet.create({
colorTip: {
width: 20,
borderTopLeftRadius: 20,
borderBottomLeftRadius: 20,
},
textSection: {
flexDirection: "column",
alignContent: "space-between",
alignItems:"flex-start",
paddingLeft: 10,
flex:1,
alignSelf: "stretch",
paddingVertical: 5
},
valueSection: {
justifyContent:"center",
borderTopRightRadius: 20,
borderBottomRightRadius: 20,
}
});
flexDirection: "column",
alignContent: "space-between",
alignItems:"flex-start",
paddingLeft: 10,
flex:1,
alignSelf: "stretch",
paddingVertical: 5
},
valueSection: {
justifyContent:"center",
borderTopRightRadius: 20,
borderBottomRightRadius: 20,
}
})