From 60d331196599598c1cb537c1dbb86bde80cf8d02 Mon Sep 17 00:00:00 2001 From: Shaw Date: Mon, 19 Feb 2024 16:42:37 +0900 Subject: [PATCH] =?UTF-8?q?[#443]=20TopNavigation=20=EC=BB=B4=ED=8F=AC?= =?UTF-8?q?=EB=84=8C=ED=8A=B8=20=EC=8A=A4=ED=83=80=EC=9D=BC=20fixed=20?= =?UTF-8?q?=EC=A0=81=EC=9A=A9=20(#488)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: TopNavigation 컴포넌트가 항상 상단에 고정되도록 스타일 수정 * typo: 불필요한 공백 제거 * fix: 데스크탑에서도 TopNavigation 이 제대로 보여지도록 수정 * style: TopNavigation 높이 수정 --- src/app/layout.tsx | 2 +- src/v1/base/TopNavigation.tsx | 6 +++--- src/v1/layout/Layout.tsx | 4 +++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 517c10db..8284b887 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -14,7 +14,7 @@ const RootLayout = ({ children }: { children: ReactNode }) => { -
+
{children}
diff --git a/src/v1/base/TopNavigation.tsx b/src/v1/base/TopNavigation.tsx index 70ea5e41..342e149d 100644 --- a/src/v1/base/TopNavigation.tsx +++ b/src/v1/base/TopNavigation.tsx @@ -8,7 +8,7 @@ type ItemProps = TopNavigationProps; const TopNavigation = ({ children }: TopNavigationProps) => { return ( -
+
{children}
); @@ -16,7 +16,7 @@ const TopNavigation = ({ children }: TopNavigationProps) => { const LeftItem = ({ children }: ItemProps) => { return ( -
+
{children}
); @@ -38,7 +38,7 @@ const CenterItem = ({ children, textAlign = 'center' }: CenterItemProps) => { const RightItem = ({ children }: ItemProps) => { return ( -
+
{children}
); diff --git a/src/v1/layout/Layout.tsx b/src/v1/layout/Layout.tsx index be16dd00..20f18aad 100644 --- a/src/v1/layout/Layout.tsx +++ b/src/v1/layout/Layout.tsx @@ -19,7 +19,9 @@ const Layout = ({ children }: LayoutProps) => { const pathname = usePathname(); const isRootPath = pathname && rootPaths.includes(pathname); - const dynamicClass = isRootPath ? 'pb-[6.4rem] pt-[2rem]' : 'py-[2rem]'; + const dynamicClass = isRootPath + ? 'pb-[6.4rem] pt-[2rem]' + : 'pt-[5.4rem] pb-[2rem]'; return ( <>