From 2383d976015dc6a0ccbefb8e8453142e7b327a27 Mon Sep 17 00:00:00 2001 From: Douglas Murita Date: Wed, 14 Aug 2024 22:16:36 -0300 Subject: [PATCH 01/15] feat: add navbar --- app/petdex/page.tsx | 8 ++++- components/petdex/Navbar/Navbar.tsx | 33 +++++++++++++++++++ components/petdex/Navbar/assets/Logo.tsx | 16 +++++++++ .../petdex/Navbar/assets/SearchIcon.tsx | 9 +++++ 4 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 components/petdex/Navbar/Navbar.tsx create mode 100644 components/petdex/Navbar/assets/Logo.tsx create mode 100644 components/petdex/Navbar/assets/SearchIcon.tsx diff --git a/app/petdex/page.tsx b/app/petdex/page.tsx index 5196481..a5c7e27 100644 --- a/app/petdex/page.tsx +++ b/app/petdex/page.tsx @@ -1,5 +1,11 @@ +import { Navbar } from "@/components/petdex/Navbar/Navbar"; + function Page() { - return

Petdex

+ return ( + <> + + + ); } export default Page diff --git a/components/petdex/Navbar/Navbar.tsx b/components/petdex/Navbar/Navbar.tsx new file mode 100644 index 0000000..0add5ef --- /dev/null +++ b/components/petdex/Navbar/Navbar.tsx @@ -0,0 +1,33 @@ + +import { Logo } from './assets/Logo' +import { SearchIcon } from './assets/SearchIcon' + +function Navbar() { + return ( +
+
+
+ + +
+
+ + + +
+
+
+ ) +} + +export { Navbar } \ No newline at end of file diff --git a/components/petdex/Navbar/assets/Logo.tsx b/components/petdex/Navbar/assets/Logo.tsx new file mode 100644 index 0000000..3bd00f8 --- /dev/null +++ b/components/petdex/Navbar/assets/Logo.tsx @@ -0,0 +1,16 @@ +function Logo() { + return ( + + + + + + + + + + + ) +} + +export { Logo } \ No newline at end of file diff --git a/components/petdex/Navbar/assets/SearchIcon.tsx b/components/petdex/Navbar/assets/SearchIcon.tsx new file mode 100644 index 0000000..b56df7c --- /dev/null +++ b/components/petdex/Navbar/assets/SearchIcon.tsx @@ -0,0 +1,9 @@ +function SearchIcon() { + return ( + + + + ) +} + +export { SearchIcon } \ No newline at end of file From 4c94f60f9e2a2b0d749f5216138652183a755e09 Mon Sep 17 00:00:00 2001 From: Douglas Murita Date: Thu, 15 Aug 2024 22:37:57 -0300 Subject: [PATCH 02/15] feat: navbar responsive mobile and tablet --- components/petdex/Navbar/Navbar.tsx | 33 +++++++++++++------ components/petdex/Navbar/assets/Logo.tsx | 2 +- .../petdex/Navbar/assets/Menu-button.tsx | 22 +++++++++++++ 3 files changed, 46 insertions(+), 11 deletions(-) create mode 100644 components/petdex/Navbar/assets/Menu-button.tsx diff --git a/components/petdex/Navbar/Navbar.tsx b/components/petdex/Navbar/Navbar.tsx index 0add5ef..16635af 100644 --- a/components/petdex/Navbar/Navbar.tsx +++ b/components/petdex/Navbar/Navbar.tsx @@ -1,29 +1,42 @@ +'use client' import { Logo } from './assets/Logo' +import { MenuButton } from './assets/Menu-button' import { SearchIcon } from './assets/SearchIcon' function Navbar() { + //state pra lidar com menu responsivo + //fn para abrir men u responsivo + const handleButton = () => console.log('abrir menu') + return ( -
-
-
- -
-
-
- - -
+
+ {!isOpen && +
+ + + +
+ }
- +
diff --git a/components/petdex/Navbar/assets/Menu-button.tsx b/components/petdex/Navbar/assets/Menu-button.tsx index 2d13fa1..2770130 100644 --- a/components/petdex/Navbar/assets/Menu-button.tsx +++ b/components/petdex/Navbar/assets/Menu-button.tsx @@ -1,20 +1,23 @@ 'use client' -function MenuButton({ handleButton }) { +function MenuButton({ handleButton, isOpen }) { return ( <> - - - + {!isOpen ? + + + - {/* - - - */} + : + + + + + } ) } From 6c8d8c7f135c06d829f4b0c31255cc31af171aeb Mon Sep 17 00:00:00 2001 From: Douglas Murita Date: Sat, 17 Aug 2024 10:45:21 -0300 Subject: [PATCH 04/15] feat: navbar desktop --- components/petdex/Navbar/Navbar.tsx | 22 ++++++++++++------- .../petdex/Navbar/assets/Menu-button.tsx | 2 -- styles/theme.css | 10 ++++----- 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/components/petdex/Navbar/Navbar.tsx b/components/petdex/Navbar/Navbar.tsx index 0c763d4..aad08b8 100644 --- a/components/petdex/Navbar/Navbar.tsx +++ b/components/petdex/Navbar/Navbar.tsx @@ -12,30 +12,36 @@ function Navbar() { const handleButton = () => setIsOpen(o => !o) return ( -
+
{!isOpen && -
+
} diff --git a/components/petdex/Navbar/assets/Menu-button.tsx b/components/petdex/Navbar/assets/Menu-button.tsx index 2770130..13de242 100644 --- a/components/petdex/Navbar/assets/Menu-button.tsx +++ b/components/petdex/Navbar/assets/Menu-button.tsx @@ -5,13 +5,11 @@ function MenuButton({ handleButton, isOpen }) { return ( <> {!isOpen ? - - : diff --git a/styles/theme.css b/styles/theme.css index e8adcad..40b5760 100644 --- a/styles/theme.css +++ b/styles/theme.css @@ -88,10 +88,8 @@ } .dark-gradient { - background: linear-gradient( - 232deg, - rgba(23, 28, 35, 0.41) 0%, - rgba(19, 22, 28, 0.7) 100% - ); + background: linear-gradient(232deg, + rgba(23, 28, 35, 0.41) 0%, + rgba(19, 22, 28, 0.7) 100%); } -} +} \ No newline at end of file From fc09a2fb64bcf57646e95ab0ce990f09f83bf108 Mon Sep 17 00:00:00 2001 From: Douglas Murita Date: Sat, 17 Aug 2024 12:50:56 -0300 Subject: [PATCH 05/15] feat: add menu component --- components/petdex/Navbar/Navbar.tsx | 44 +++++++++++++----------- components/petdex/Navbar/assets/Menu.tsx | 17 +++++++++ 2 files changed, 40 insertions(+), 21 deletions(-) create mode 100644 components/petdex/Navbar/assets/Menu.tsx diff --git a/components/petdex/Navbar/Navbar.tsx b/components/petdex/Navbar/Navbar.tsx index aad08b8..cbedf93 100644 --- a/components/petdex/Navbar/Navbar.tsx +++ b/components/petdex/Navbar/Navbar.tsx @@ -4,6 +4,7 @@ import { useState } from 'react' import { Logo } from './assets/Logo' import { MenuButton } from './assets/Menu-button' import { SearchIcon } from './assets/SearchIcon' +import { Menu } from './assets/Menu' function Navbar() { const [isOpen, setIsOpen] = useState(false) @@ -11,41 +12,42 @@ function Navbar() { //fn para abrir men u responsivo const handleButton = () => setIsOpen(o => !o) + const handleSearchButton = () => console.log('pesquisando ...') + return (
-
+
-
- {!isOpen && -
- +
+
+ + {!isOpen && + + } +
- -
- } -
+
diff --git a/components/petdex/Navbar/assets/Menu.tsx b/components/petdex/Navbar/assets/Menu.tsx new file mode 100644 index 0000000..3cda536 --- /dev/null +++ b/components/petdex/Navbar/assets/Menu.tsx @@ -0,0 +1,17 @@ +function Menu() { + return ( + + ) +} + +export { Menu } \ No newline at end of file From 63f8357680aa8b5e6a6f8d2ea1a8297892328b98 Mon Sep 17 00:00:00 2001 From: Douglas Murita Date: Sat, 17 Aug 2024 13:02:56 -0300 Subject: [PATCH 06/15] fix: open menu items with click menu button --- components/petdex/Navbar/Navbar.tsx | 2 +- components/petdex/Navbar/assets/Menu-button.tsx | 2 +- components/petdex/Navbar/assets/Menu.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/petdex/Navbar/Navbar.tsx b/components/petdex/Navbar/Navbar.tsx index cbedf93..089d1b4 100644 --- a/components/petdex/Navbar/Navbar.tsx +++ b/components/petdex/Navbar/Navbar.tsx @@ -23,7 +23,7 @@ function Navbar() {
- {isOpen && } + {!isOpen && }
diff --git a/components/petdex/Navbar/assets/Menu-button.tsx b/components/petdex/Navbar/assets/Menu-button.tsx index 13de242..0c1effb 100644 --- a/components/petdex/Navbar/assets/Menu-button.tsx +++ b/components/petdex/Navbar/assets/Menu-button.tsx @@ -4,7 +4,7 @@ function MenuButton({ handleButton, isOpen }) { return ( <> - {!isOpen ? + {isOpen ? diff --git a/components/petdex/Navbar/assets/Menu.tsx b/components/petdex/Navbar/assets/Menu.tsx index 3cda536..a94bbd1 100644 --- a/components/petdex/Navbar/assets/Menu.tsx +++ b/components/petdex/Navbar/assets/Menu.tsx @@ -14,4 +14,4 @@ function Menu() { ) } -export { Menu } \ No newline at end of file +export { Menu } From a8646a7d65113e3ef25bd94b4fe94201a547693b Mon Sep 17 00:00:00 2001 From: Douglas Murita Date: Sat, 17 Aug 2024 13:33:19 -0300 Subject: [PATCH 07/15] fix: hidden search-button when click menu button --- components/petdex/Navbar/Navbar.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/petdex/Navbar/Navbar.tsx b/components/petdex/Navbar/Navbar.tsx index 089d1b4..5d73814 100644 --- a/components/petdex/Navbar/Navbar.tsx +++ b/components/petdex/Navbar/Navbar.tsx @@ -30,7 +30,7 @@ function Navbar() {
{!isOpen && @@ -51,8 +51,8 @@ function Navbar() {
-
-
+
+
) } From 1278b2289bc20f8e8caceab060ead7cf7b7e26c8 Mon Sep 17 00:00:00 2001 From: Douglas Murita Date: Sat, 17 Aug 2024 15:13:26 -0300 Subject: [PATCH 08/15] fix: menu side visible --- components/petdex/Navbar/Navbar.tsx | 39 +++++++++++++----------- components/petdex/Navbar/assets/Logo.tsx | 28 +++++++++++------ 2 files changed, 40 insertions(+), 27 deletions(-) diff --git a/components/petdex/Navbar/Navbar.tsx b/components/petdex/Navbar/Navbar.tsx index 5d73814..d86ce95 100644 --- a/components/petdex/Navbar/Navbar.tsx +++ b/components/petdex/Navbar/Navbar.tsx @@ -8,11 +8,12 @@ import { Menu } from './assets/Menu' function Navbar() { const [isOpen, setIsOpen] = useState(false) + const [isSearch, setIsSearch] = useState(true) //state pra lidar com menu responsivo //fn para abrir men u responsivo const handleButton = () => setIsOpen(o => !o) - const handleSearchButton = () => console.log('pesquisando ...') + const handleSearchButton = () => setIsSearch(s => !s) return (
@@ -20,36 +21,40 @@ function Navbar() {
- {!isOpen && - - } -
+ + +
-
- -
+ {isSearch && +
+ +
+ }
diff --git a/components/petdex/Navbar/assets/Logo.tsx b/components/petdex/Navbar/assets/Logo.tsx index 405b8e4..5317317 100644 --- a/components/petdex/Navbar/assets/Logo.tsx +++ b/components/petdex/Navbar/assets/Logo.tsx @@ -1,15 +1,23 @@ -function Logo() { +function Logo({ isSearch }) { return ( - - - - - - - - - + <> + { + isSearch + ? + < path d="M17.0016 6.49626V6.53373C17.0011 7.26641 17.1293 7.99369 17.3806 8.68355L17.3658 8.63884C17.6101 9.31107 18.0252 9.91089 18.5717 10.3814L18.5766 10.385C19.0947 10.8431 19.7837 11.1222 20.5393 11.1222H20.5983H20.5959C21.5926 11.1166 22.5472 10.7264 23.2537 10.0358C24.0255 9.34004 24.626 8.48089 25.0096 7.52344L25.0256 7.47752C25.3974 6.57267 25.5932 5.60735 25.6027 4.63163V4.58933C25.6027 3.83526 25.4686 3.1114 25.2237 2.43951L25.2385 2.48422C24.9942 1.81199 24.5791 1.21217 24.0326 0.741638L24.0277 0.738012C23.4716 0.246665 22.7452 -0.0170868 21.9974 0.00085922H22.0011C21.004 0.00504458 20.0489 0.395448 19.3432 1.08725C18.5791 1.78298 17.9837 2.63822 17.6009 3.58995L17.5849 3.63587C17.2293 4.48178 17.0189 5.46425 17.0078 6.49264V6.49626H17.0016ZM23.5786 15.6176L23.5773 15.7191C23.5759 16.6279 23.8618 17.5146 24.3956 18.2569L24.3858 18.2424C24.6292 18.5868 24.9538 18.8682 25.332 19.0626C25.7102 19.2571 26.1307 19.3587 26.5576 19.359L26.6794 19.3566H26.6732C27.6818 19.3457 28.6512 18.9716 29.3975 18.3052L29.3938 18.3088C30.1878 17.641 30.8299 16.8167 31.2787 15.8895C31.7274 14.9622 31.9728 13.9527 31.9988 12.9264V12.9167L32 12.8177C32 11.869 31.6973 10.9893 31.1817 10.2678L31.1916 10.2823C30.9383 9.91873 30.5947 9.62465 30.1933 9.42798C29.7919 9.2313 29.3461 9.13854 28.8979 9.15847H28.9041C27.8955 9.16937 26.9261 9.54348 26.1798 10.2098L26.1835 10.2062C25.3883 10.878 24.7456 11.7063 24.2969 12.6374C23.8482 13.5685 23.6034 14.5817 23.5786 15.6116V15.62V15.6176ZM15.9975 15.1077C14.2011 15.204 12.4805 15.851 11.0781 16.9578L11.0953 16.9445C9.37858 18.1419 7.89939 19.6376 6.73077 21.3577L6.69139 21.4194C5.63808 22.8092 5.0225 24.4716 4.92072 26.2012L4.91949 26.2254L4.91703 26.3305C4.91703 26.8187 5.03885 27.2804 5.25419 27.6852L5.2468 27.6695C5.45341 28.0407 5.77609 28.3368 6.16721 28.5142L6.17951 28.519C6.53758 28.687 6.95472 28.8187 7.39031 28.8924L7.41984 28.896C7.87405 28.9664 8.33324 29.0012 8.79306 29H8.88535H8.88042C10.1483 28.9175 11.3921 28.6207 12.5571 28.1226L12.4857 28.1504C13.586 27.6793 14.7589 27.3929 15.9557 27.3033L15.9939 27.3009C17.3511 27.4 18.6086 27.6997 19.7776 28.1698L19.6952 28.1408C20.9141 28.6216 22.2044 28.9048 23.5158 28.9794L23.5503 28.9806C25.9013 28.9822 27.0768 28.0642 27.0768 26.2266C27.0235 24.939 26.6465 23.6843 25.9792 22.5747L26.0002 22.6109C25.2803 21.2813 24.3758 20.0563 23.3128 18.9711L23.3177 18.9759C22.2786 17.9101 21.0904 16.995 19.7887 16.2581L19.7124 16.2182C18.6006 15.537 17.3267 15.1533 16.0172 15.1052H16.0025L15.9975 15.1077ZM11.4017 11.1234H11.4583C12.1839 11.1242 12.8841 10.8607 13.4234 10.3838L13.4209 10.3863C13.9631 9.92269 14.3763 9.33136 14.6219 8.66784L14.6317 8.63884C14.8758 7.96298 14.9995 7.25084 14.9972 6.53373V6.49385V6.49626C14.9861 5.46304 14.7757 4.48178 14.4004 3.5827L14.4201 3.63587C14.0388 2.66807 13.4388 1.79788 12.6654 1.09088L12.6605 1.08725C11.9546 0.396627 11.0002 0.0067715 10.0039 0.00206767H9.94602C9.19051 0.00206767 8.50143 0.282428 7.98094 0.741638L7.9834 0.739221C7.44445 1.20206 7.02855 1.78936 6.78245 2.45763L6.7726 2.48664C6.53758 3.11745 6.40223 3.84614 6.40223 4.60504V4.62921V4.628C6.41289 5.62427 6.61537 6.60957 6.99901 7.5319L6.97933 7.47873C7.36091 8.45181 7.96552 9.32554 8.7463 10.0322L8.75122 10.037C9.45808 10.7259 10.412 11.1147 11.4078 11.1198H11.4091L11.4017 11.1234ZM3.09592 9.16089L2.98271 9.15847C2.08323 9.15847 1.28957 9.60077 0.814598 10.2763L0.808445 10.2847C0.279819 11.0285 -0.00247574 11.9142 1.71661e-05 12.8213L0.00124931 12.9252V12.9204C0.0254803 13.9461 0.269035 14.9553 0.716108 15.8825C1.16318 16.8098 1.80378 17.6344 2.59634 18.3028L2.60618 18.3113C3.35134 18.9751 4.31832 19.3478 5.32432 19.359H5.32679C5.77114 19.3786 6.21333 19.2875 6.6122 19.0942C7.01107 18.9008 7.35367 18.6116 7.6081 18.2532L7.61426 18.2448C8.16394 17.4762 8.44698 16.5541 8.42145 15.6152V15.62C8.39789 14.5907 8.15476 13.5777 7.70776 12.6465C7.26076 11.7152 6.61983 10.8863 5.82636 10.2134L5.81652 10.205C5.0722 9.54322 4.10725 9.17146 3.1033 9.15968H3.10084L3.09592 9.16089Z" fill="#003459" /> + + + + + + + + : + + + } + ) } From 1c599020654ee25e6f6ed37854deb624bfe5536b Mon Sep 17 00:00:00 2001 From: Douglas Murita Date: Mon, 19 Aug 2024 14:16:42 -0300 Subject: [PATCH 09/15] fix: init ternary menu button --- components/petdex/Navbar/assets/Menu-button.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/components/petdex/Navbar/assets/Menu-button.tsx b/components/petdex/Navbar/assets/Menu-button.tsx index 0c1effb..77cfffb 100644 --- a/components/petdex/Navbar/assets/Menu-button.tsx +++ b/components/petdex/Navbar/assets/Menu-button.tsx @@ -4,17 +4,17 @@ function MenuButton({ handleButton, isOpen }) { return ( <> - {isOpen ? + {!isOpen ? + + + + + : - : - - - - } ) From 04c26f31d17703de2587cbae5a7ebcadc231cd68 Mon Sep 17 00:00:00 2001 From: Douglas Murita Date: Fri, 23 Aug 2024 12:49:58 -0300 Subject: [PATCH 10/15] fix: navbar --- components/petdex/Navbar/Navbar.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/components/petdex/Navbar/Navbar.tsx b/components/petdex/Navbar/Navbar.tsx index d86ce95..71ca975 100644 --- a/components/petdex/Navbar/Navbar.tsx +++ b/components/petdex/Navbar/Navbar.tsx @@ -9,8 +9,7 @@ import { Menu } from './assets/Menu' function Navbar() { const [isOpen, setIsOpen] = useState(false) const [isSearch, setIsSearch] = useState(true) - //state pra lidar com menu responsivo - //fn para abrir men u responsivo + const handleButton = () => setIsOpen(o => !o) const handleSearchButton = () => setIsSearch(s => !s) From 26060d6219036dc45a3667ca0787a294b1a4b0eb Mon Sep 17 00:00:00 2001 From: Douglas Murita Date: Wed, 28 Aug 2024 20:06:22 -0300 Subject: [PATCH 11/15] add types navbar --- components/petdex/Navbar/Navbar.tsx | 18 +++++++++---- components/petdex/Navbar/Navbar.types.ts | 5 ++++ .../petdex/Navbar/assets/Logo-mobile.tsx | 10 +++++++ components/petdex/Navbar/assets/Logo.tsx | 27 +++++++------------ .../Navbar/assets/Menu-button-mobile.tsx | 13 +++++++++ .../petdex/Navbar/assets/Menu-button.tsx | 19 +++++-------- .../petdex/Navbar/assets/SearchIcon.tsx | 8 ++++-- 7 files changed, 63 insertions(+), 37 deletions(-) create mode 100644 components/petdex/Navbar/Navbar.types.ts create mode 100644 components/petdex/Navbar/assets/Logo-mobile.tsx create mode 100644 components/petdex/Navbar/assets/Menu-button-mobile.tsx diff --git a/components/petdex/Navbar/Navbar.tsx b/components/petdex/Navbar/Navbar.tsx index 71ca975..e6d0dfc 100644 --- a/components/petdex/Navbar/Navbar.tsx +++ b/components/petdex/Navbar/Navbar.tsx @@ -5,6 +5,9 @@ import { Logo } from './assets/Logo' import { MenuButton } from './assets/Menu-button' import { SearchIcon } from './assets/SearchIcon' import { Menu } from './assets/Menu' +import { LogoMobile } from './assets/Logo-mobile' +import { MenuButtonMobile } from './assets/Menu-button-mobile' +import { NavbarTypes } from './Navbar.types' function Navbar() { const [isOpen, setIsOpen] = useState(false) @@ -20,7 +23,10 @@ function Navbar() {
@@ -50,13 +52,13 @@ function Navbar() {
{isSearch &&
- {!isOpen + {isOpen ? : } diff --git a/components/petdex/Navbar/assets/Menu.tsx b/components/petdex/Navbar/assets/Menu.tsx index 7a62452..666ae9e 100644 --- a/components/petdex/Navbar/assets/Menu.tsx +++ b/components/petdex/Navbar/assets/Menu.tsx @@ -2,7 +2,7 @@ import Link from "next/link" function Menu() { return ( -
    +
    • Home
    • diff --git a/components/petdex/Navbar/assets/MenuMobile.tsx b/components/petdex/Navbar/assets/MenuMobile.tsx new file mode 100644 index 0000000..45bcd14 --- /dev/null +++ b/components/petdex/Navbar/assets/MenuMobile.tsx @@ -0,0 +1,19 @@ +import Link from "next/link" + +function MenuMobile({ isOpen }) { + return ( +
        +
      • + Home +
      • +
      • + Petdex +
      • +
      • + Contato +
      • +
      + ) +} + +export { MenuMobile } From 063d4f701097e95ec35ab3ca8b5b109c7ccf8cf9 Mon Sep 17 00:00:00 2001 From: Douglas Murita Date: Sat, 31 Aug 2024 16:05:55 -0300 Subject: [PATCH 15/15] rename button close --- components/petdex/Navbar/Navbar.tsx | 22 +++++++++++-------- .../petdex/Navbar/assets/LogoMobile.tsx | 7 +++++- .../{MenuButton.tsx => MenuButtonClose.tsx} | 4 ++-- 3 files changed, 21 insertions(+), 12 deletions(-) rename components/petdex/Navbar/assets/{MenuButton.tsx => MenuButtonClose.tsx} (84%) diff --git a/components/petdex/Navbar/Navbar.tsx b/components/petdex/Navbar/Navbar.tsx index f5c6776..c1299c4 100644 --- a/components/petdex/Navbar/Navbar.tsx +++ b/components/petdex/Navbar/Navbar.tsx @@ -2,7 +2,7 @@ import { useState } from 'react' import { Logo } from './assets/Logo' -import { MenuButton } from './assets/MenuButton' +import { MenuButtonClose } from './assets/MenuButtonClose' import { SearchIcon } from './assets/SearchIcon' import { Menu } from './assets/Menu' import { LogoMobile } from './assets/LogoMobile' @@ -12,7 +12,7 @@ import { MenuMobile } from './assets/MenuMobile' function Navbar() { const [isOpen, setIsOpen] = useState(false) - const [isSearch, setIsSearch] = useState(true) + const [isSearch, setIsSearch] = useState(false) const handleButton = () => setIsOpen(o => !o) @@ -24,13 +24,13 @@ function Navbar() {
      +
      + handleSearchButton={handleSearchButton} + />
      + - {isSearch && + + {!isSearch &&
      {isOpen - ? + ? : }
      diff --git a/components/petdex/Navbar/assets/LogoMobile.tsx b/components/petdex/Navbar/assets/LogoMobile.tsx index 270059b..f65bfe5 100644 --- a/components/petdex/Navbar/assets/LogoMobile.tsx +++ b/components/petdex/Navbar/assets/LogoMobile.tsx @@ -1,7 +1,12 @@ function LogoMobile() { return ( - diff --git a/components/petdex/Navbar/assets/MenuButton.tsx b/components/petdex/Navbar/assets/MenuButtonClose.tsx similarity index 84% rename from components/petdex/Navbar/assets/MenuButton.tsx rename to components/petdex/Navbar/assets/MenuButtonClose.tsx index dfed947..22b3942 100644 --- a/components/petdex/Navbar/assets/MenuButton.tsx +++ b/components/petdex/Navbar/assets/MenuButtonClose.tsx @@ -1,6 +1,6 @@ 'use client' -function MenuButton({ handleButton }) { +function MenuButtonClose({ handleButton }) { return ( <> @@ -13,4 +13,4 @@ function MenuButton({ handleButton }) { ) } -export { MenuButton } +export { MenuButtonClose }