diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..c9b64c1 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,12 @@ +{ + "printWidth": 80, + "tabWidth": 2, + "useTabs": false, + "semi": true, + "singleQuote": true, + "trailingComma": "all", + "bracketSpacing": true, + "jsxBracketSameLine": false, + "arrowParens": "avoid", + "proseWrap": "always" +} diff --git a/src/components/InputForm.jsx b/src/components/InputForm.jsx index e9fece3..5258189 100644 --- a/src/components/InputForm.jsx +++ b/src/components/InputForm.jsx @@ -10,9 +10,6 @@ const InputForm = () => { onChange={''} required /> - - - ); diff --git a/src/components/TodoItem.jsx b/src/components/TodoItem.jsx new file mode 100644 index 0000000..a379fba --- /dev/null +++ b/src/components/TodoItem.jsx @@ -0,0 +1,24 @@ +import React from 'react'; + +const TodoItem = ({ todo, onDelete, onEdit }) => { + const { id, title, completed } = todo; + + const handleDelete = () => { + onDelete(id); + }; + + const handleEdit = () => { + onEdit(id); + }; + + return ( +
{title}
+ + +