Last active
July 7, 2019 08:44
-
-
Save JeromeFranco/a0664458aac175386d99d74dd4fa6359 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const TodoItem = ({ todo, onDelete, canDelete }) => { | |
return ( | |
<div> | |
<div>{todo.desc}</div> | |
<div> | |
<button disabled={!canDelete} onClick={() => onDelete(todo)} /> | |
</div> | |
</div> | |
); | |
}; | |
TodoItem.propTypes = { | |
todos: PropTypes.object, | |
onDelete: PropTypes.func, | |
canDelete: PropTypes.bool, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment