Skip to content

Instantly share code, notes, and snippets.

@lkostrowski
Last active April 4, 2017 10:32
Show Gist options
  • Save lkostrowski/beb73cb59b7c40815d5591acb9183827 to your computer and use it in GitHub Desktop.
Save lkostrowski/beb73cb59b7c40815d5591acb9183827 to your computer and use it in GitHub Desktop.
product html
<template>
<li class="basket-product">
<img :src="productData.imagePath" class="basket-product__image | image">
<div class="basket-product__info">
<span class="basket-product__brand">{{productData.brand}}</span>
<span class="basket-product__name">{{productData.name}}</span>
<span class="basket-product__product-number">{{productData.itemId}}</span>
<span class="basket-product__color">{{productData.color}}</span>
</div>
<div class="basket-product__prices">
<span v-if="productData.price.promo" class="basket-product__price | price price--type_promo">{{productData.price.promo}}</span>
<span class="basket-product__price | price" :class="productData.price.promo? 'price--type_old' : '' ">{{productData.price.base}}</span>
</div>
</li>
</template>
<script>
export default {
name: 'basket-product',
props: {
productData: {
imagePath: String,
brand: String,
name: String,
itemId: String,
color: String,
price: {
base: String,
promo: String
}
}
}
};
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment