Created
June 3, 2019 06:19
-
-
Save john-raymon/d71b3df019faefc15460cc7fd8b10350 to your computer and use it in GitHub Desktop.
LineItem Component
This file contains 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 characters
import React from 'react' | |
function LineItem({ id, name, quantity, removeProductFromCart }) { | |
return ( | |
<div className="cart-container__line-item w-100 flex items-center justify-between pb2"> | |
<div className="w-auto pr1"> | |
<p className="tracked ttc f7"> | |
{name} - ({quantity}) | |
</p> | |
</div> | |
<button className="dim b1 b--mid-gray outline-0 pointer pa2" onClick={() => removeProductFromCart(id)}> | |
Remove from Cart | |
</button> | |
</div> | |
) | |
} | |
export default LineItem; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment