Created
June 28, 2019 15:28
-
-
Save xthecapx/09d0a623d4b9c1993be435a47ec2c303 to your computer and use it in GitHub Desktop.
Revisions
-
xthecapx created this gist
Jun 28, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ import React from 'react'; import {products} from './products'; const ProductDetails = ({ name, productId }) => { const product = products[productId]; return ( <div className="product-deatils"> <h2>Product Details</h2> <div> <h3>{ product.name }</h3> <h4>{ product.price }</h4> <p>{ product.description }</p> </div> </div> ) }; export default ProductDetails;