adding back docs

This commit is contained in:
Ken
2019-02-22 20:25:09 -08:00
parent 78368cdf39
commit f70417f6ae
166 changed files with 4344 additions and 516 deletions

View File

@@ -0,0 +1,20 @@
import React from 'react';
import { Todos } from '../TodoApp.types';
interface TodoFooterProps {
clear: () => void;
todos: Todos;
}
export const TodoFooter = (props: TodoFooterProps) => {
const itemCount = Object.keys(props.todos).filter(id => !props.todos[id].completed).length;
return (
<footer>
<span>
{itemCount} item{itemCount > 1 ? 's' : ''} left
</span>
<button onClick={() => props.clear()} className="submit">
Clear Completed
</button>
</footer>
);
};