Skip to content

Instantly share code, notes, and snippets.

@darksh3ll
Last active January 28, 2019 10:37
Show Gist options
  • Select an option

  • Save darksh3ll/a2a0e17055ebca99ddec5e35cf60f36c to your computer and use it in GitHub Desktop.

Select an option

Save darksh3ll/a2a0e17055ebca99ddec5e35cf60f36c to your computer and use it in GitHub Desktop.
import image json
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