Skip to content

Instantly share code, notes, and snippets.

Created February 20, 2023 20:45
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save nataliaconde/42d4dcca7a232084f00c621a738d2a26 to your computer and use it in GitHub Desktop.
// components/Task.js
export default function Task(props) {
// ...
{props.isDone ? (
<Button size="small" onClick={() => props.markTaskAsUndone(}>Mark as undone</Button>
) : (
<Button size="small" onClick={() => props.markTaskAsDone(}>Mark as done</Button>
<Button size="small" onClick={() => props.deleteTask(}>Delete</Button>
// ...
// Your final file should look like this:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment