import { Todo } from "@/store/useTodos"; import { FlatList } from "react-native"; import { VStack } from "./ui/vstack"; import { Text } from "./ui/text"; import { HStack } from "./ui/hstack"; import { Checkbox, CheckboxIcon, CheckboxIndicator, CheckboxLabel, } from "./ui/checkbox"; import { Button, ButtonText } from "./ui/button"; import { GS } from "./ui/gluestack-ui-provider/gluestack-ui-token"; import { CheckIcon, CloseIcon, Icon } from "@/components/ui/icon"; import * as Animatable from "react-native-animatable"; type Props = { data: Todo[]; onToggle: (id: string) => void; onRemove?: (id: string) => void; className?: string; emptyMessage?: string; }; export default function TodoList({ data, onToggle, onRemove, emptyMessage, className, }: Props) { return ( it.id} contentContainerStyle={{ paddingBottom: 80 }} renderItem={({ item }) => { return ( onToggle(item.id)} value={item.title} > {/* */} {/* */} {item.title} {onRemove ? ( ) : null} ); }} ListEmptyComponent={ {emptyMessage ?? "할 일이 없습니다."} } /> ); }