Skip to content

Instantly share code, notes, and snippets.

@Y-Taras
Last active July 2, 2017 17:19
Show Gist options
  • Save Y-Taras/83e8a7bab19015ee89db2de0939b4523 to your computer and use it in GitHub Desktop.
Save Y-Taras/83e8a7bab19015ee89db2de0939b4523 to your computer and use it in GitHub Desktop.
<CardDeck>
array.slice(0, 3).map(function mapProductCards(elem, index) {
return (
<Card className="m-1" style={{width: '18rem'}} key={elem.id}>
<CardImg top width="100%" src={`/public/img/${elem.image}`} />
<CardBlock>
<CardTitle>{elem.name}</CardTitle>
<CardText>{elem.price}</CardText>
<CardText>isAvailable</CardText>
<CardText>{elem.manufacturer}</CardText>
<Button>Add to Cart</Button>
</CardBlock>
</Card>)
}
)
</CardDeck>
<CardDeck>
array.slice(3, 6).map(function mapProductCards(elem, index) {
return (
<Card className="m-1" style={{width: '18rem'}} key={elem.id}>
<CardImg top width="100%" src={`/public/img/${elem.image}`} />
<CardBlock>
<CardTitle>{elem.name}</CardTitle>
<CardText>{elem.price}</CardText>
<CardText>isAvailable</CardText>
<CardText>{elem.manufacturer}</CardText>
<Button>Add to Cart</Button>
</CardBlock>
</Card>)
}
)
</CardDeck>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment