diff options
| author | HATEC\SPVDEV001 <tri.susilo@altama.co.id> | 2023-04-10 10:05:12 +0700 |
|---|---|---|
| committer | HATEC\SPVDEV001 <tri.susilo@altama.co.id> | 2023-04-10 10:05:12 +0700 |
| commit | 13f6c6ad2a98efcc12b4e00b28699b584257c089 (patch) | |
| tree | 6898b0b56889302b0abacbbfc104ea183bbfcefe /src/core | |
| parent | 0f7846a32deec5cb400d9e73c2f2127b5de1cffd (diff) | |
| parent | 4b25b3e36c459b34f075550ca6e61b1d8f2643ce (diff) | |
Merge branch 'master' into development_tri/condition_page_detail_product
# Conflicts:
# src/lib/product/components/Product/ProductDesktop.jsx
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/components/elements/Badge/Badge.jsx | 29 | ||||
| -rw-r--r-- | src/core/components/elements/Link/Link.jsx | 2 | ||||
| -rw-r--r-- | src/core/components/elements/Navbar/NavbarDesktop.jsx | 143 | ||||
| -rw-r--r-- | src/core/components/elements/Navbar/Search.jsx | 2 |
4 files changed, 73 insertions, 103 deletions
diff --git a/src/core/components/elements/Badge/Badge.jsx b/src/core/components/elements/Badge/Badge.jsx deleted file mode 100644 index e50cdc78..00000000 --- a/src/core/components/elements/Badge/Badge.jsx +++ /dev/null @@ -1,29 +0,0 @@ -const Badge = ({ children, type, ...props }) => { - return ( - <div - {...props} - className={`${badgeStyle(type)} ${props?.className}`} - > - {children} - </div> - ) -} - -Badge.defaultProps = { - className: '' -} - -const badgeStyle = (type) => { - let className = ['rounded px-1 text-[11px]'] - switch (type) { - case 'solid-red': - className.push('bg-red_r-11 text-white') - break - case 'light': - className.push('bg-gray_r-4 text-gray_r-11') - break - } - return className.join(' ') -} - -export default Badge diff --git a/src/core/components/elements/Link/Link.jsx b/src/core/components/elements/Link/Link.jsx index 05859639..360444a6 100644 --- a/src/core/components/elements/Link/Link.jsx +++ b/src/core/components/elements/Link/Link.jsx @@ -13,7 +13,7 @@ const Link = ({ children, ...props }) => { <NextLink {...props} scroll={false} - className={`block font-medium text-red_r-11 ${props?.className || ''}`} + className={`block font-medium text-danger-500 ${props?.className || ''}`} > {children} </NextLink> diff --git a/src/core/components/elements/Navbar/NavbarDesktop.jsx b/src/core/components/elements/Navbar/NavbarDesktop.jsx index c01cb777..fcb54802 100644 --- a/src/core/components/elements/Navbar/NavbarDesktop.jsx +++ b/src/core/components/elements/Navbar/NavbarDesktop.jsx @@ -22,7 +22,7 @@ const NavbarDesktop = () => { return ( <DesktopView> - <div className='py-3 bg-yellow_r-10/80' id='desktop-nav-top'> + <div className='py-3 bg-warning-400' id='desktop-nav-top'> <div className='container mx-auto flex justify-between'> <Link href='/' className='!text-gray_r-12'> Tentang Indoteknik.com @@ -41,7 +41,7 @@ const NavbarDesktop = () => { </div> </div> - <nav className='py-6 sticky top-0 z-50 bg-white border-b border-gray_r-6'> + <nav className='pt-6 sticky top-0 z-50 bg-white border-b-2 border-danger-500'> <div className='container mx-auto flex gap-x-6'> <Link href='/'> <Image src={IndoteknikLogo} alt='Indoteknik Logo' width={210} height={210 / 3} /> @@ -52,7 +52,7 @@ const NavbarDesktop = () => { <div className='flex gap-x-4'> <Link href='/my/transactions' className='flex items-center gap-x-2 !text-gray_r-12/80'> <DocumentCheckIcon className='w-7' /> - Pending + Daftar <br /> Quotation </Link> @@ -80,81 +80,80 @@ const NavbarDesktop = () => { </a> </div> </div> - </nav> - - <div className='container mx-auto mt-6'> - <div className='flex bg-gray_r-2'> - <button - type='button' - onClick={() => setIsOpenCategory((isOpen) => !isOpen)} - onBlur={() => setIsOpenCategory(false)} - className='w-3/12 p-4 font-semibold border border-gray_r-6 rounded-tl-xl flex items-center relative' - > - <div>Kategori Produk</div> - <ChevronDownIcon className={`ml-auto w-6 ${isOpenCategory ? 'rotate-180' : ''}`} /> + <div className='container mx-auto mt-6'> + <div className='flex'> + <button + type='button' + onClick={() => setIsOpenCategory((isOpen) => !isOpen)} + onBlur={() => setIsOpenCategory(false)} + className='w-3/12 p-4 font-semibold border border-gray_r-6 rounded-t-xl flex items-center relative' + > + <div>Kategori Produk</div> + <ChevronDownIcon className={`ml-auto w-6 ${isOpenCategory ? 'rotate-180' : ''}`} /> - <div className={`category-mega-box-wrapper ${isOpenCategory ? 'show' : ''}`}> - <Category /> + <div className={`category-mega-box-wrapper ${isOpenCategory ? 'show' : ''}`}> + <Category /> + </div> + </button> + <div className='w-6/12 flex px-1 divide-x divide-gray_r-6'> + <Link + href='/shop/brands' + className='p-4 flex-1 flex justify-center items-center !text-gray_r-12/80 hover:bg-gray_r-3 idt-transition' + > + Semua Brand + </Link> + <Link + href='/shop/search?orderBy=stock' + className='p-4 flex-1 flex justify-center items-center !text-gray_r-12/80 hover:bg-gray_r-3 idt-transition' + > + Ready Stock + </Link> + <Link + href='/blog' + className='p-4 flex-1 flex justify-center items-center !text-gray_r-12/80 hover:bg-gray_r-3 idt-transition' + > + Blog Indoteknik + </Link> + <Link + href='/video' + className='p-4 flex-1 flex justify-center items-center !text-gray_r-12/80 hover:bg-gray_r-3 idt-transition' + > + Indoteknik TV + </Link> </div> - </button> - <div className='w-6/12 flex gap-x-1 px-1 bg-gray_r-1'> - <Link - href='/shop/brands' - className='p-4 flex-1 flex justify-center items-center !text-gray_r-12/80 bg-gray_r-2 hover:bg-gray_r-4 border border-gray_r-6 idt-transition' - > - Semua Brand - </Link> - <Link - href='/shop/search?orderBy=stock' - className='p-4 flex-1 flex justify-center items-center !text-gray_r-12/80 bg-gray_r-2 hover:bg-gray_r-4 border border-gray_r-6 idt-transition' - > - Ready Stock - </Link> - <Link - href='/blog' - className='p-4 flex-1 flex justify-center items-center !text-gray_r-12/80 bg-gray_r-2 hover:bg-gray_r-4 border border-gray_r-6 idt-transition' - > - Blog Indoteknik - </Link> - <Link - href='/video' - className='p-4 flex-1 flex justify-center items-center !text-gray_r-12/80 bg-gray_r-2 hover:bg-gray_r-4 border border-gray_r-6 idt-transition' - > - Indoteknik TV - </Link> - </div> - <div className='w-3/12 flex gap-x-1 relative'> - {!auth && ( - <> - <Link - href='/login' - className='flex-1 flex justify-center items-center bg-red_r-11 !text-gray_r-1 rounded-none' - > - Masuk - </Link> - <Link - href='/register' - className='flex-1 flex justify-center items-center bg-red_r-11 !text-gray_r-1 rounded-none rounded-tr-xl' - > - Daftar - </Link> - </> - )} - {auth && ( - <> - <div href='/' className='navbar-user-dropdown-button'> - <span>Halo, {auth?.name}</span> - <div className='ml-auto'> - <ChevronDownIcon className='w-6' /> + <div className='w-3/12 flex gap-x-1 relative'> + {!auth && ( + <> + <Link + href='/login' + className='flex-1 flex justify-center items-center bg-danger-500 !text-gray_r-1 rounded-none rounded-t-xl' + > + Masuk + </Link> + <Link + href='/register' + className='flex-1 flex justify-center items-center bg-danger-500 !text-gray_r-1 rounded-none rounded-t-xl' + > + Daftar + </Link> + </> + )} + {auth && ( + <> + <div href='/' className='navbar-user-dropdown-button'> + <span>Halo, {auth?.name}</span> + <div className='ml-auto'> + <ChevronDownIcon className='w-6' /> + </div> </div> - </div> - <NavbarUserDropdown /> - </> - )} + <NavbarUserDropdown /> + </> + )} + </div> </div> </div> - </div> + </nav> </DesktopView> ) } diff --git a/src/core/components/elements/Navbar/Search.jsx b/src/core/components/elements/Navbar/Search.jsx index 32a8d170..d0627b24 100644 --- a/src/core/components/elements/Navbar/Search.jsx +++ b/src/core/components/elements/Navbar/Search.jsx @@ -73,7 +73,7 @@ const Search = () => { <Link href={`/shop/search?q=${suggestion.term}`} key={index} - className='px-3 py-3 !text-gray_r-12 font-normal hover:bg-yellow_r-4' + className='px-3 py-3 !text-gray_r-12 font-normal' > {suggestion.term} </Link> |
