mirror of
https://github.com/microsoft/frontend-bootcamp.git
synced 2026-03-26 19:56:44 +08:00
14 lines
353 B
TypeScript
14 lines
353 B
TypeScript
import React from 'react';
|
|
|
|
export const TodoFooter = (props: any) => {
|
|
const itemCount = Object.keys(props.todos).filter(id => !props.todos[id].completed).length;
|
|
return (
|
|
<footer>
|
|
<span>
|
|
{itemCount} item{itemCount > 1 ? 's' : ''} left
|
|
</span>
|
|
<button className="button">Clear Completed</button>
|
|
</footer>
|
|
);
|
|
};
|