UNPKG

react-todolist-component

Version:

A clean, customizable React TodoList component with TypeScript support and advanced modal editor

38 lines (37 loc) 990 B
export interface TodoItem { id: string; text: string; completed: boolean; createdAt: Date; updatedAt: Date; assignedTo?: string; priority?: 'low' | 'medium' | 'high'; category?: string; dueDate?: Date; comments?: Array<{ id: string; author: string; content: string; timestamp: string; }>; } export interface TodoListProps { items?: TodoItem[]; onAddItem?: (text: string) => void; onToggleItem?: (id: string) => void; onDeleteItem?: (id: string) => void; onEditItem?: (id: string, text: string) => void; showCompleted?: boolean; allowEdit?: boolean; allowDelete?: boolean; showPriority?: boolean; showCategory?: boolean; showDueDate?: boolean; showAssignedTo?: boolean; placeholder?: string; className?: string; theme?: 'light' | 'dark'; maxItems?: number; sortBy?: 'createdAt' | 'priority' | 'dueDate' | 'text'; sortOrder?: 'asc' | 'desc'; }