Use an atom for the Cart button
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="shop-location__cart">
|
<div class="cart-button">
|
||||||
<ButtonCircle color="purple" on:click={handleCartOpening}>
|
<ButtonCircle color="purple" on:click={handleCartOpening}>
|
||||||
<img src="/images/icons/pin.svg" alt="">
|
<img src="/images/icons/pin.svg" alt="">
|
||||||
</ButtonCircle>
|
</ButtonCircle>
|
||||||
|
|||||||
27
src/style/atoms/_cart-button.scss
Normal file
27
src/style/atoms/_cart-button.scss
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
// Cart
|
||||||
|
.cart-button {
|
||||||
|
display: none;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
@include bp (sm) {
|
||||||
|
display: flex;
|
||||||
|
margin-left: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.quantity {
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
left: -12px;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 22px;
|
||||||
|
height: 22px;
|
||||||
|
font-size: rem(11px);
|
||||||
|
font-weight: 600;
|
||||||
|
color: #fff;
|
||||||
|
background-color: $color-secondary;
|
||||||
|
border-radius: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -440,4 +440,4 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,6 +43,7 @@
|
|||||||
@import "atoms/box-cta";
|
@import "atoms/box-cta";
|
||||||
@import "atoms/site-title";
|
@import "atoms/site-title";
|
||||||
@import "atoms/photo";
|
@import "atoms/photo";
|
||||||
|
@import "atoms/cart-button";
|
||||||
|
|
||||||
// Molecules
|
// Molecules
|
||||||
@import "molecules/photo-card";
|
@import "molecules/photo-card";
|
||||||
|
|||||||
Reference in New Issue
Block a user