Last active
January 28, 2019 10:37
-
-
Save darksh3ll/a2a0e17055ebca99ddec5e35cf60f36c to your computer and use it in GitHub Desktop.
import image json
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 characters
| import React from 'react'; | |
| import { Card, CardImg, CardText, CardBody, | |
| CardSubtitle, Button } from 'reactstrap'; | |
| const Cards = ({article,addPanier}) => { | |
| return ( | |
| <Card className="col-sm-6 col-md-4"> | |
| <CardImg top width="100%" src={require(`../../assets/${article.img}`)} | |
| alt="Card image cap"/> | |
| <CardBody> | |
| <CardSubtitle>{article.article}</CardSubtitle> | |
| <CardText>{article.prix}</CardText> | |
| <Button | |
| onClick={() => addPanier(article.prix,article.article,article.img,article.id)} | |
| > | |
| Commander | |
| </Button> | |
| </CardBody> | |
| </Card> | |
| ); | |
| }; | |
| export default Cards; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment