simplify 2-2 exercise

This commit is contained in:
Ken
2019-02-28 14:09:25 -08:00
parent 88425249ea
commit f6d185632c
7 changed files with 239 additions and 40 deletions
@@ -1,7 +1,20 @@
import React from 'react';
import { Store } from '../store';
export const TodoFooter = (props: any) => {
const itemCount = 3;
// TODO: import DefaultButton, Stack, and Text
interface TodoFooterProps {
clear: () => void;
todos: Store['todos'];
}
export const TodoFooter = (props: TodoFooterProps) => {
const itemCount = Object.keys(props.todos).filter(id => !props.todos[id].completed).length;
// TODO:
// 1. replace the <footer> with the Fabric control <Stack>
// 2. replace the <span> with the Fabric control <Text>
// 3. replace the <button> with Fabric control <DefaultButton>
return (
<footer>