doc: add data to Table component

This commit is contained in:
Leon Xu committed 2022-05-02 21:09:11 -07:00
1 parent 954ae57aa8
commit a48b4d3027
1 file changed
+13 -2
+13 -2
View File
@@ -1,8 +1,19 @@
import React from "react";
import "./Table.css";
function Table() {
return <section></section>;
function Table({ countries }) {
return (
<section className="table">
{countries.map(({ country, cases }) => (
<tr>
<td>{country}</td>
<td>
<strong>{cases}</strong>
</td>
</tr>
))}
</section>
);
}
export default Table;