🎨 styles: header hightlight

:%s
This commit is contained in:
lytrankieio123 2021-08-25 11:08:30 +07:00
parent d735e327b2
commit 53616185f2
8 changed files with 129 additions and 22 deletions

View File

@ -1,18 +1,8 @@
import { ButtonCommon, ButtonIconBuy, Inputcommon, InputSearch, Layout, MenuDropdown } from 'src/components/common'; import { ButtonCommon, ButtonIconBuy, Inputcommon, InputSearch, Layout } from 'src/components/common';
import { IconBuy, IconUser } from 'src/components/icons'; import { IconBuy } from 'src/components/icons';
const optionMenu = [
{
link: '/',
name: 'Account',
},
{
link: '/',
name: 'Logout',
},
]
export default function Home() { export default function Home() {
return ( return (
<> <>
@ -29,8 +19,6 @@ export default function Home() {
</div> </div>
<ButtonCommon type='ghost' icon={<IconBuy />}>Button</ButtonCommon> <ButtonCommon type='ghost' icon={<IconBuy />}>Button</ButtonCommon>
<ButtonIconBuy /> <ButtonIconBuy />
<MenuDropdown options={optionMenu}><IconUser /></MenuDropdown>
</> </>
) )
} }

View File

@ -1,19 +1,38 @@
import { FC } from 'react' import { FC, memo } from 'react'
import { IconUser } from 'src/components/icons'
import MenuDropdown from '../MenuDropdown/MenuDropdown'
import HeaderHighLight from './components/HeaderHighLight/HeaderHighLight'
import HeaderMenu from './components/HeaderMenu/HeaderMenu'
import HeaderSubMenu from './components/HeaderSubMenu/HeaderSubMenu'
import s from './Header.module.scss' import s from './Header.module.scss'
const OPTION_MENU = [
{
link: '/',
name: 'Account',
},
{
link: '/',
name: 'Logout',
},
]
// {/* <MenuDropdown options={OPTION_MENU} isHasArrow={false}><IconUser /></MenuDropdown> */}
interface Props { interface Props {
className?: string className?: string
children?: any children?: any
} }
const Header: FC<Props> = ({ }: Props) => { const Header = memo(({ }: Props) => {
return ( return (
<div className={s.header}> <header className={s.header}>
This is Header <HeaderHighLight />
<h1 className={s.heading}>This is heading</h1> <HeaderMenu />
<div className={s.logo}>This is logo text</div> <HeaderSubMenu />
</div> </header>
) )
} })
export default Header export default Header

View File

@ -0,0 +1,8 @@
@import "../../../../../styles/utilities";
.headerHighLight {
@apply flex justify-between items-center spacing-horizontal bg-primary;
padding-top: 0.8rem;
padding-bottom: 0.8rem;
}

View File

@ -0,0 +1,48 @@
import Link from 'next/link'
import { memo } from 'react'
import { ROUTE } from 'src/utils/constanst.utils'
import s from './HeaderHighLight.module.scss'
const MENU = [
{
name: 'Delivery & Policy',
link: ROUTE.PRIVACY_POLICY,
},
{
name: 'Blog',
link: ROUTE.BLOGS,
},
{
name: 'About Us',
link: ROUTE.ABOUT,
},
]
interface Props {
className?: string
children?: any
}
const HeaderHighLight = memo(({ }: Props) => {
return (
<section className={s.headerHighLight}>
<div>
Free Shipping on order $49+ / Express $99+
</div>
<div className="menu">
{
MENU.map(item => <li key={item.name}>
<Link href={item.link}>
<a >
{item.name}
</a>
</Link>
</li>)
}
</div>
</section>
)
})
export default HeaderHighLight

View File

@ -0,0 +1,5 @@
@import "../../../../../styles/utilities";
.headerHighLight {
}

View File

@ -0,0 +1,17 @@
import { memo } from 'react'
import s from './HeaderMenu.module.scss'
interface Props {
className?: string
children?: any
}
const HeaderMenu = memo(({ }: Props) => {
return (
<section className={s.headerMenu}>
</section>
)
})
export default HeaderMenu

View File

@ -0,0 +1,5 @@
@import "../../../../../styles/utilities";
.headerHighLight {
}

View File

@ -0,0 +1,17 @@
import { memo } from 'react'
import s from './HeaderSubMenu.module.scss'
interface Props {
className?: string
children?: any
}
const HeaderSubMenu = memo(({ }: Props) => {
return (
<section className={s.headerSubMenu}>
</section>
)
})
export default HeaderSubMenu