{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "todo-list", "title": "Todo List", "description": "Interactive todo list with checkbox toggle, strikethrough on completion, colored left border, and delete action.", "registryDependencies": [ "https://raw.githubusercontent.com/dnachavez/adminlte-next/master/public/r/adminlte-theme.json", "https://raw.githubusercontent.com/dnachavez/adminlte-next/master/public/r/adminlte-label.json", "https://raw.githubusercontent.com/dnachavez/adminlte-next/master/public/r/use-todo-list.json" ], "files": [ { "path": "registry/new-york/todo-list/components/todo-list.tsx", "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"@/registry/new-york/adminlte-theme/lib/cn\"\n\n/* ---------------------------------------------------------------------------\n * TodoList\n * -------------------------------------------------------------------------- */\n\ninterface TodoListProps extends React.HTMLAttributes {}\n\nconst TodoList = React.forwardRef(\n ({ className, children, ...props }, ref) => {\n return (\n \n {children}\n \n )\n }\n)\nTodoList.displayName = \"TodoList\"\n\n/* ---------------------------------------------------------------------------\n * TodoItem\n * -------------------------------------------------------------------------- */\n\ninterface TodoItemProps extends React.HTMLAttributes {\n text: string\n done?: boolean\n onToggle?: () => void\n onDelete?: () => void\n color?: string\n tools?: React.ReactNode\n}\n\nconst TodoItem = React.forwardRef(\n (\n {\n className,\n text,\n done = false,\n onToggle,\n onDelete,\n color,\n tools,\n ...props\n },\n ref\n ) => {\n return (\n \n {/* Checkbox */}\n \n\n {/* Text */}\n \n {text}\n \n\n {/* Tools */}\n
\n {tools}\n\n {onDelete && (\n \n ×\n \n )}\n
\n \n )\n }\n)\nTodoItem.displayName = \"TodoItem\"\n\nexport { TodoList, TodoItem }\nexport type { TodoListProps, TodoItemProps }\n", "type": "registry:component" } ], "type": "registry:component" }