fixing up docs

This commit is contained in:
Ken
2019-02-24 14:17:33 -08:00
parent 1e609dd408
commit 5654f8897a
86 changed files with 638 additions and 279 deletions

View File

@@ -7,12 +7,16 @@ interface TodoFooterProps {
export const TodoFooter = (props: TodoFooterProps) => {
const itemCount = Object.keys(props.todos).filter(id => !props.todos[id].completed).length;
const _onClick = () => {
props.clear();
};
return (
<footer>
<span>
{itemCount} item{itemCount > 1 ? 's' : ''} left
</span>
<button onClick={() => props.clear()} className="submit">
<button onClick={_onClick} className="submit">
Clear Completed
</button>
</footer>