This repository has been archived on 2026-04-20. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
interaktive-systeme/components/budget/categoryItem.tsx
2024-01-02 12:14:03 +01:00

49 lines
No EOL
1.1 KiB
TypeScript

import { ColorValue, StyleSheet, View } from "react-native";
import { useThemeColor } from "../../hooks/useThemeColor";
import CustomCard from "../common/CustomCard";
export type CategoryItemProps = {
category: string,
color: ColorValue,
allocated_account: number,
}
const CategoryItem = (properties: CategoryItemProps) => {
const textColor = useThemeColor("primaryText");
const backgroundColor = useThemeColor("backgroundColor");
return (
<CustomCard>
< View style={[styles.textSection, {backgroundColor: backgroundColor}]}>
</View>
<View style={[styles.valueSection, {backgroundColor: backgroundColor}]}>
</View>
</CustomCard>
);
};
export default CategoryItem;
const styles = StyleSheet.create({
textSection: {
flexDirection: "column",
alignContent: "space-between",
alignItems:"flex-start",
paddingLeft: 10,
flex:1,
alignSelf: "stretch",
paddingVertical: 5
},
valueSection: {
justifyContent:"center",
borderTopRightRadius: 20,
borderBottomRightRadius: 20,
}
});