Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import socksGreenImage from './assets/images/socks_green.jpeg'

const product = ref('Socks')
const image = ref(socksGreenImage)
const iventory = ref(15)
const onSale = ref(true)

</script>

Expand All @@ -16,6 +18,10 @@ const image = ref(socksGreenImage)
</div>
<div class="product-info">
<h1>{{ product }}</h1>
<p v-if="iventory > 10">In Stock</p>
<p v-else-if="iventory <= 10 && iventory > 0">Almost sold out!</p>
<p v-else>Out of stock</p>
<p v-show="onSale">On Sale</p>
</div>
</div>
</div>
Expand Down