mirror of
https://github.com/urosran/cally.git
synced 2025-11-26 16:34:54 +00:00
changes to groceries, todos
This commit is contained in:
@ -1,26 +1,34 @@
|
||||
import React from "react";
|
||||
import { View, Text, TouchableOpacity } from "react-native-ui-lib";
|
||||
import { GroceryCategory } from "@/contexts/GroceryContext";
|
||||
import { GroceryCategory, useGroceryContext } from "@/contexts/GroceryContext";
|
||||
import { ScrollView } from "react-native-gesture-handler";
|
||||
|
||||
const CategoryDropdown = () => {
|
||||
const CategoryDropdown = (props: {
|
||||
setSelectedCategory: (category: GroceryCategory) => void;
|
||||
}) => {
|
||||
const groceryCategories = Object.values(GroceryCategory);
|
||||
|
||||
return (
|
||||
<ScrollView height={100}>
|
||||
{groceryCategories.map((category) => (
|
||||
<TouchableOpacity onPress={() => {}}>
|
||||
<View
|
||||
key={category}
|
||||
style={{
|
||||
padding: 10,
|
||||
<View height={100}>
|
||||
<ScrollView>
|
||||
{groceryCategories.map((category) => (
|
||||
<TouchableOpacity
|
||||
onPress={() => {
|
||||
props.setSelectedCategory(category);
|
||||
}}
|
||||
>
|
||||
<Text>{category}</Text>
|
||||
</View>
|
||||
</TouchableOpacity>
|
||||
))}
|
||||
</ScrollView>
|
||||
<View
|
||||
key={category}
|
||||
style={{
|
||||
padding: 10,
|
||||
}}
|
||||
>
|
||||
<Text>{category}</Text>
|
||||
</View>
|
||||
</TouchableOpacity>
|
||||
))}
|
||||
</ScrollView>
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user