🎨 styles: cart drawer

:%s
This commit is contained in:
lytrankieio123
2021-09-06 17:57:58 +07:00
parent 7a5a28082b
commit aa285d8577
5 changed files with 12 additions and 6 deletions

View File

@@ -8,6 +8,7 @@
:global(.customArrow) { :global(.customArrow) {
width: 64px; width: 64px;
height: 64px; height: 64px;
border-radius: .8rem;
&:focus { &:focus {
outline: none; outline: none;
} }

View File

@@ -4,6 +4,7 @@
@apply flex bg-info; @apply flex bg-info;
padding: 1.2rem 1.6rem; padding: 1.2rem 1.6rem;
.text { .text {
color: var(--white);
font-weight: bold; font-weight: bold;
margin-right: 0.8rem; margin-right: 0.8rem;
} }

View File

@@ -12,6 +12,7 @@
.productCardWarpper { .productCardWarpper {
padding-left: 1.6rem; padding-left: 1.6rem;
:global(.customArrow) { :global(.customArrow) {
@apply bg-line;
@screen lg { @screen lg {
&:global(.leftArrow) { &:global(.leftArrow) {
left: calc(-6.4rem - 2rem); left: calc(-6.4rem - 2rem);

View File

@@ -10,7 +10,7 @@ const ProductsInCart = ({ data }: Props) => {
return ( return (
<ul className={s.productsInCart}> <ul className={s.productsInCart}>
{ {
data.map(item => <li key={item.name}> data.slice(0,1).map(item => <li key={item.name}>
<ProductCartItem <ProductCartItem
name={item.name} name={item.name}
slug={item.slug} slug={item.slug}

View File

@@ -9,19 +9,15 @@
width: 90%; width: 90%;
box-shadow: -3px 0 10px rgba(0, 0, 0, 0.15); box-shadow: -3px 0 10px rgba(0, 0, 0, 0.15);
z-index: 20000; z-index: 20000;
@screen md {
width: unset;
}
.inner { .inner {
@apply flex flex-col bg-white; @apply flex flex-col bg-white;
width: fit-content; width: fit-content;
height: 100vh; height: 100vh;
min-width: 48rem;
width: 100%; width: 100%;
margin-right: 0; margin-right: 0;
@screen md { @screen md {
max-width: 50rem; max-width: 55rem;
} }
.top { .top {
@apply flex justify-between items-center; @apply flex justify-between items-center;
@@ -46,4 +42,11 @@
&.hide { &.hide {
transform: translateX(110%); transform: translateX(110%);
} }
@screen md {
width: unset;
.inner {
min-width: 48rem;
}
}
} }