Make Shop location switcher a component using a global store
Using two switchers (one in the shop nav and the other in the cart) makes possible to have the switcher over the Cart overlay (over intro)
This commit is contained in:
@@ -6,8 +6,7 @@
|
||||
// Components
|
||||
import Button from '$components/atoms/Button.svelte'
|
||||
import CartItem from '$components/molecules/CartItem.svelte'
|
||||
|
||||
let open = false
|
||||
import ShopLocationSwitcher from '$components/molecules/ShopLocationSwitcher.svelte'
|
||||
|
||||
|
||||
onMount(async () => {
|
||||
@@ -99,6 +98,13 @@
|
||||
</script>
|
||||
|
||||
{#if $cartOpen}
|
||||
<div class="cart-switcher"
|
||||
in:fly={{ y: -24, duration: 1000, easing: quartOut }}
|
||||
out:fly={{ y: -24, duration: 1000, easing: quartOut }}
|
||||
>
|
||||
<ShopLocationSwitcher isOver={true} />
|
||||
</div>
|
||||
|
||||
<aside class="cart shadow-box-dark"
|
||||
class:is-updating={$cartIsUpdating}
|
||||
transition:fly={{ x: 48, duration: 600, easing: quartOut }}
|
||||
|
||||
Reference in New Issue
Block a user