diff --git a/src/components/ProductInfo/ProductInfo.tsx b/src/components/ProductInfo/ProductInfo.tsx new file mode 100644 index 0000000..cd3895a --- /dev/null +++ b/src/components/ProductInfo/ProductInfo.tsx @@ -0,0 +1,41 @@ +import { Table, TableBody, TableCell, TableContainer, TableHead, TableRow } from '@mui/material'; + +type Product = { + id: number; + name: string; + stocks: number; + lastModified: string; +}; + +type ProductInfoProps = { + products: Product[]; +}; + +export default function ProductInfo(props: ProductInfoProps) { + const { products } = props; + + return ( + + + + + Product ID + Product Name + Stocks + Last Modified + + + + {products.map((product) => ( + + {product.id} + {product.name} + {product.stocks} + {product.lastModified} + + ))} + +
+
+ ); +} diff --git a/src/components/ProductsLists/ProductsLists.tsx b/src/components/ProductsLists/ProductsLists.tsx new file mode 100644 index 0000000..0ca5980 --- /dev/null +++ b/src/components/ProductsLists/ProductsLists.tsx @@ -0,0 +1,18 @@ +const ProductsLists = [ + { + id: 1, + name: 'Product 1', + stocks: 10, + lastModified: '2022-02-24' + }, + { + id: 2, + name: 'Product 2', + stocks: 5, + lastModified: '2022-02-23' + }, + // add more products here + ]; + + export default ProductsLists; + \ No newline at end of file diff --git a/src/routes/Products/Products.tsx b/src/routes/Products/Products.tsx index 2d0326e..2f456c6 100644 --- a/src/routes/Products/Products.tsx +++ b/src/routes/Products/Products.tsx @@ -1,6 +1,9 @@ import React from "react"; import styles from "../../styles"; import ProductsIcon from "../../Components/Icons/ProductsIcon/ProductsIcon"; +import ProductInfo from "../../Components/ProductInfo/ProductInfo"; +import ProductsLists from "../../Components/ProductsLists/ProductsLists"; + export default function Products() { return (
@@ -8,6 +11,7 @@ export default function Products() {

Products

+ ); }