Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#443] TopNavigation 컴포넌트 스타일 fixed 적용 #488

Merged
merged 4 commits into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const RootLayout = ({ children }: { children: ReactNode }) => {
</head>
<body className="app-layout">
<ContextProvider>
<main className={`${LineSeedKR.variable} font-lineseed `}>
<main className={`${LineSeedKR.variable} font-lineseed`}>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment;

헉 공백이 있었군요 잘 캐치해주신것같습니다 👍

{children}
</main>
</ContextProvider>
Expand Down
6 changes: 3 additions & 3 deletions src/v1/base/TopNavigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ type ItemProps = TopNavigationProps;

const TopNavigation = ({ children }: TopNavigationProps) => {
return (
<div className="relative flex h-[2.4rem] w-full items-center justify-center bg-opacity-0 px-[2rem] py-[1.7rem] text-md">
<div className="fixed left-0 right-0 top-0 z-50 mx-auto flex h-[2.4rem] w-full max-w-[43rem] items-center justify-center bg-white px-[4rem] py-[2.7rem] text-md">
{children}
</div>
);
};

const LeftItem = ({ children }: ItemProps) => {
return (
<div className="absolute left-[0rem] flex [&_svg]:h-[2rem] [&_svg]:w-[2rem] [&_svg]:cursor-pointer">
<div className="absolute left-[0rem] flex pl-[2rem] [&_svg]:h-[2rem] [&_svg]:w-[2rem] [&_svg]:cursor-pointer">
{children}
</div>
);
Expand All @@ -38,7 +38,7 @@ const CenterItem = ({ children, textAlign = 'center' }: CenterItemProps) => {

const RightItem = ({ children }: ItemProps) => {
return (
<div className="absolute right-[0rem] flex gap-[1rem] [&_svg]:h-[2rem] [&_svg]:w-[2rem] [&_svg]:cursor-pointer">
<div className="absolute right-[0rem] flex gap-[1rem] pr-[2rem] [&_svg]:h-[2rem] [&_svg]:w-[2rem] [&_svg]:cursor-pointer">
{children}
</div>
);
Expand Down
4 changes: 3 additions & 1 deletion src/v1/layout/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<>
Expand Down
Loading