Skip to content

Commit

Permalink
fix css
Browse files Browse the repository at this point in the history
  • Loading branch information
JessL868 committed Feb 14, 2025
1 parent 6f7cd90 commit 88ae7cf
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
20 changes: 17 additions & 3 deletions app/src/components/GroceryCart.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<template>
<div>
<h1>Cart</h1>
<h2 v-for="(item, index) in store.cart" :key="index" :index="index">{{ item.name }} - {{ item.cost }}</h2>
<div class="container">
<h1>Cart</h1>
<h2 v-for="(item, index) in store.cart" :key="index" :index="index">{{ item.name }} - {{ item.cost }}</h2>
</div>
</div>
</template>

Expand All @@ -10,5 +12,17 @@ import { store } from '../cart.js'
</script>

<style scoped>
h1 {
text-align: center;
}
h2 {
text-align: center;
margin-left: 2rem;
object-fit: contain;
height: 50rem;
width: 50rem;
}
.container {
margin-top: 10rem;
}
</style>
1 change: 0 additions & 1 deletion app/src/components/ShopProduce.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
<script setup>
import { store } from '../cart.js'
import ProductCss from '../components/ProductCss.vue'
import cart from '../components/GroceryCart.vue'
const products = [
{name: "Broccoli (per lb)",
cost: "$2.99"},
Expand Down

0 comments on commit 88ae7cf

Please sign in to comment.