🎨 styles: responsive header main menu

:%s
This commit is contained in:
lytrankieio123 2021-08-25 15:32:01 +07:00
parent 10a4e703d6
commit 6ab7b0ae97
5 changed files with 90 additions and 49 deletions

View File

@ -1,6 +1,12 @@
@import "../../../styles/utilities"; @import "../../../styles/utilities";
.header { .header {
@apply sticky bg-white;
top: 0;
z-index: 9999;
@screen md {
padding-bottom: 1.6rem;
}
.menu { .menu {
padding-left: 3.2rem; padding-left: 3.2rem;
padding-right: 3.2rem; padding-right: 3.2rem;

View File

@ -1,6 +1,8 @@
@import "../../../../../styles/utilities"; @import "../../../../../styles/utilities";
.headerHighLight { .headerHighLight {
@apply hidden;
@screen md {
@apply flex justify-between items-center spacing-horizontal bg-primary caption; @apply flex justify-between items-center spacing-horizontal bg-primary caption;
padding-top: 0.8rem; padding-top: 0.8rem;
padding-bottom: 0.8rem; padding-bottom: 0.8rem;
@ -17,4 +19,5 @@
} }
} }
} }
}
} }

View File

@ -1,22 +1,44 @@
@import "../../../../../styles/utilities"; @import "../../../../../styles/utilities";
.headerMenu { .headerMenu {
@apply flex justify-between items-center bg-white; padding-top: 1.6rem;
padding-bottom: 0.8rem;
@screen md {
@apply flex justify-between items-center;
padding-top: 2.4rem; padding-top: 2.4rem;
padding-bottom: 2.4rem; padding-bottom: 2.4rem;
}
.left { .left {
@apply flex items-center; .top {
@apply flex justify-between items-center;
.iconCart {
}
}
.inputSearch { .inputSearch {
margin-left: 4.8rem;
//todo: remove //todo: remove
border: 1px solid red; border: 1px solid red;
margin-top: 2.4rem;
@screen lg { @screen lg {
min-width: 51.2rem; min-width: 51.2rem;
max-width: 50%; max-width: 50%;
} }
} }
@screen md {
@apply flex items-center;
.top {
.iconCart {
@apply hidden;
}
}
.inputSearch {
margin-left: 4.8rem;
margin-top: 0;
}
}
} }
.menu { .menu {
@apply hidden;
@screen md {
@apply flex items-center list-none; @apply flex items-center list-none;
li { li {
@apply flex justify-center items-center w-full; @apply flex justify-center items-center w-full;
@ -31,4 +53,5 @@
} }
} }
} }
}
} }

View File

@ -26,7 +26,12 @@ const HeaderMenu = memo(({ }: Props) => {
return ( return (
<section className={s.headerMenu}> <section className={s.headerMenu}>
<div className={s.left}> <div className={s.left}>
<div className={s.top}>
<div>Online Grocery</div> <div>Online Grocery</div>
<button className={s.iconCart}>
<IconBuy />
</button>
</div>
<div className={s.inputSearch}> <div className={s.inputSearch}>
<InputSearch /> <InputSearch />
</div> </div>

View File

@ -1,6 +1,9 @@
@import "../../../../../styles/utilities"; @import "../../../../../styles/utilities";
.headerSubMenu { .headerSubMenu {
@apply hidden;
@screen md {
@apply block;
padding-bottom: 0.8rem; padding-bottom: 0.8rem;
@screen lg { @screen lg {
@apply flex justify-between items-center; @apply flex justify-between items-center;
@ -26,4 +29,5 @@
} }
} }
} }
}
} }