Add entering transition on Shop and fix some styling

- Center intro title vertically
- Cart item styling tweaks
- Add cart button quantity label inside of button so it's clickable
This commit is contained in:
2021-12-06 22:14:02 +01:00
parent 9da5ae55cd
commit f15a2f2e47
7 changed files with 72 additions and 15 deletions

View File

@@ -14,9 +14,8 @@
<div class="button-cart">
<ButtonCircle color="purple" on:click={openCart}>
<Icon icon="bag" label="Cart icon" />
{#if $cartAmount > 0}
<span class="quantity" transition:scale={{ start: 0.6, duration: 400, easing: quartOut }}>{$cartAmount}</span>
{/if}
</ButtonCircle>
{#if $cartAmount > 0}
<span class="quantity" transition:scale={{ start: 0.6, duration: 400, easing: quartOut }}>{$cartAmount}</span>
{/if}
</div>

View File

@@ -30,7 +30,10 @@
</div>
<div class="cart-item__right">
<h3>Poster</h3>
<p>{item.product.name} {item.price_total}</p>
<p>
{item.product.name}
<br> {item.price}
</p>
{#if item && item.quantity}
<Select

View File

@@ -140,7 +140,7 @@
<div class="cart__content">
{#if $cartAmount > 0}
{#each $cartData.items as item, index}
<CartItem {item} {index}
<CartItem {item}
on:updatedQuantity={changedQuantity}
on:removed={removedItem}
/>
@@ -155,7 +155,7 @@
{/if}
{#if !$cartData || $cartIsUpdating}
<div class="cart__update">
<div class="cart__update" transition:fade={{ duration: 400 }}>
<p>Updating…</p>
</div>
{/if}