Resolve "Categories, detailed view on Press"

This commit is contained in:
Thomas Schleicher 2024-01-05 12:27:56 +00:00
parent b927b0e8a0
commit 412e88d007
8 changed files with 105 additions and 16 deletions

View file

@ -9,8 +9,8 @@ const addCategory = () => {
const parameters = useLocalSearchParams();
const [categoryName, setCartegoryName] = useState<string>("Enter Category Name...");
const [categoryColor, setCartegoryColor] = useState<null|string>(null);
const [categoryName, setCategoryName] = useState<string>("Enter Category Name...");
const [categoryColor, setCategoryColor] = useState<null|string>(null);
const [selectedType, setSelectedType] = useState<string>("expense");
return (
@ -20,7 +20,7 @@ const addCategory = () => {
<View style={[styles.containerStyle, {backgroundColor: colors.containerColor}]}>
<View style={[styles.textInputViewStyle, {backgroundColor: colors.elementDefaultColor}]}>
<TextInput placeholder={categoryName} placeholderTextColor={colors.secondaryText} style={[styles.textInputStyle, {color: colors.primaryText}]} onChangeText={(newName: string) => {
setCartegoryName(newName);
setCategoryName(newName);
}}/>
</View>
@ -33,7 +33,7 @@ const addCategory = () => {
<View>
<CustomColorPicker currentColor={categoryColor} handleColorChange={(color) => {
setCartegoryColor(color);
setCategoryColor(color);
}}/>
</View>