Skip to content

Instantly share code, notes, and snippets.

@sumitkharche
Created May 9, 2020 13:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sumitkharche/ce0a47a83b73eee306f8e61e8cd7f3a9 to your computer and use it in GitHub Desktop.
Save sumitkharche/ce0a47a83b73eee306f8e61e8cd7f3a9 to your computer and use it in GitHub Desktop.
import React from 'react';
import { Stack, Label } from "@fluentui/react";
import TodoItem from './TodoItem';
function TodoList(props:any) {
return (
<Stack gap={10} >
{ props.todos.length > 0 ? props.todos.map((todo: any) => (
<TodoItem todo={todo} key={todo.id}/>
)):
<Label>Todo list is empty...</Label>}
</Stack>
);
}
export default TodoList;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment