diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-01-09 12:08:27 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-01-09 12:08:27 +0700 |
| commit | bd1e930f875e942ee8a60718a3c1268a62598266 (patch) | |
| tree | 6c6ca1d56fd257b33425c25fe2aa75623bddcbe9 /src/components | |
| parent | db76cfe50ea485333f9aab8e3580ac7b352350ed (diff) | |
checkout to odoo, select address
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/Alert.js | 8 | ||||
| -rw-r--r-- | src/components/Header.js | 32 |
2 files changed, 18 insertions, 22 deletions
diff --git a/src/components/Alert.js b/src/components/Alert.js index 64268e05..914d1590 100644 --- a/src/components/Alert.js +++ b/src/components/Alert.js @@ -2,17 +2,17 @@ const Alert = ({ children, className, type }) => { let typeClass = ''; switch (type) { case 'info': - typeClass = ' bg-blue-100 text-blue-900 ' + typeClass = ' bg-blue-100 text-blue-900 border-blue-400 ' break; case 'success': - typeClass = ' bg-green-100 text-green-900 ' + typeClass = ' bg-green-100 text-green-900 border-green-400 ' break; case 'warning': - typeClass = ' bg-yellow-100 text-yellow-900 ' + typeClass = ' bg-yellow-100 text-yellow-900 border-yellow-400 ' break; } return ( - <div className={"rounded w-full text-medium p-3" + typeClass + className}>{children}</div> + <div className={"rounded-md w-full text-medium p-3 border" + typeClass + className}>{children}</div> ); } diff --git a/src/components/Header.js b/src/components/Header.js index 7f08c2c3..71f8fd58 100644 --- a/src/components/Header.js +++ b/src/components/Header.js @@ -19,6 +19,12 @@ import Link from "./Link"; import Logo from "../images/logo.png"; import greeting from "../helpers/greeting"; +const menus = [ + { name: 'Semua Brand', href: '/shop/brands' }, + { name: 'Blog Indoteknik', href: '/' }, + { name: 'Kategori', href: '/' }, +]; + export default function Header({ title }) { const router = useRouter(); const { q = '' } = router.query; @@ -93,24 +99,14 @@ export default function Header({ title }) { ) } </div> <div className="flex flex-col"> - <Link className="flex w-full font-normal text-gray_r-11 border-b border-gray_r-6 p-4 py-3" href="/shop/brands" onClick={closeMenu}> - <span>Semua Brand</span> - <div className="ml-auto"> - <ChevronRightIcon className="text-gray_r-12 w-5" /> - </div> - </Link> - <Link className="flex w-full font-normal text-gray_r-11 border-b border-gray_r-6 p-4 py-3" href="/blog" onClick={closeMenu}> - <span>Blog Indoteknik</span> - <div className="ml-auto"> - <ChevronRightIcon className="text-gray_r-12 w-5" /> - </div> - </Link> - <button className="flex w-full font-normal text-gray_r-11 border-b border-gray_r-6 p-4 py-3" onClick={closeMenu}> - <span>Kategori</span> - <div className="ml-auto"> - <ChevronRightIcon className="text-gray_r-12 w-5" /> - </div> - </button> + { menus.map((menu, index) => ( + <Link className="flex w-full font-normal text-gray_r-11 border-b border-gray_r-6 p-4" href={menu.href} key={index} onClick={closeMenu}> + <span>{ menu.name }</span> + <div className="ml-auto"> + <ChevronRightIcon className="text-gray_r-12 w-5" /> + </div> + </Link> + )) } </div> </div> <div className={isMenuActive ? 'menu-overlay block opacity-100' : 'menu-overlay hidden opacity-0'} onClick={closeMenu}></div> |
