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

Fix: Tab, Nav 간격 수정 #280

Merged
merged 3 commits into from
Jan 26, 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
24 changes: 12 additions & 12 deletions src/components/common/nav/Nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,30 +38,30 @@ const Nav = () => {
navigate('/');
window.scrollTo({ top: 0, left: 0, behavior: 'smooth' });
}}
className="cursor-pointer flex-col items-center justify-center px-2">
className="w-[53.12px] cursor-pointer flex-col items-center justify-center px-2">
<div className="flex justify-center">
<HomeIcon
size={24}
fill={isActive('/') ? 'currentColor' : 'none'}
/>
</div>
<p className="caption1 mt-[3px] text-center font-normal text-gray7">
<p className="caption1 mt-[2px] text-center font-normal text-gray7">
</p>
</div>

{isLoggedIn ? (
<div
onClick={() => navigate('/mytrip')}
className="cursor-pointer flex-col items-center justify-center px-2">
className="cursor-pointe w-[53.12px] flex-col items-center justify-center px-2">
<div className="flex justify-center">
{isActive('/mytrip') ? (
<CalendarIcon2 size={24} />
) : (
<CalendarIcon3 size={24} />
)}
</div>
<p className="caption1 mt-[6px] text-center text-xs/[11px] font-normal text-gray7">
<p className="caption1 mt-[5px] text-center text-xs/[11px] font-normal text-gray7">
여정
</p>
</div>
Expand All @@ -76,14 +76,14 @@ const Nav = () => {
</>
}
onConfirm={handleConfirm}>
<div className="cursor-pointer flex-col items-center justify-center px-2">
<div className="w-[53.12px] cursor-pointer flex-col items-center justify-center px-2">
<div className="flex justify-center">
<CalendarIcon3
size={24}
fill={isActive('/mytrip') ? '#1E1E1E' : 'none'}
/>
</div>
<p className="caption1 mt-[6px] text-center text-xs/[11px] font-normal text-gray7">
<p className="caption1 mt-[5px] text-center text-xs/[11px] font-normal text-gray7">
여정
</p>
</div>
Expand All @@ -93,14 +93,14 @@ const Nav = () => {
{isLoggedIn ? (
<div
onClick={() => navigate('/wishlist')}
className="cursor-pointer flex-col items-center justify-center px-2">
className="w-[53.12px] cursor-pointer flex-col items-center justify-center px-2">
<div className="flex justify-center">
<HeartIcon
size={24}
fill={isActive('/wishlist') ? 'currentColor' : 'none'}
/>
</div>
<p className="caption1 mt-[5px] text-center text-xs/[11px] font-normal text-gray7">
<p className="caption1 mt-[4px] whitespace-nowrap text-center text-xs/[11px] font-normal text-gray7">
관심목록
</p>
</div>
Expand All @@ -115,14 +115,14 @@ const Nav = () => {
</>
}
onConfirm={handleConfirm}>
<div className="cursor-pointer flex-col items-center justify-center px-2">
<div className="w-[53.12px] cursor-pointer flex-col items-center justify-center px-2">
<div className="flex justify-center">
<HeartIcon
size={24}
fill={isActive('/wishlist') ? 'currentColor' : 'none'}
/>
</div>
<p className="caption1 mt-[5px] text-center text-xs/[11px] font-normal text-gray7">
<p className="caption1 mt-[4px] whitespace-nowrap text-center text-xs/[11px] font-normal text-gray7">
관심목록
</p>
</div>
Expand All @@ -131,14 +131,14 @@ const Nav = () => {

<div
onClick={() => navigate('/mypage')}
className="cursor-pointer flex-col items-center justify-center px-1">
className="w-[53.12px] cursor-pointer flex-col items-center justify-center px-1 pt-[1px]">
<div className="flex justify-center">
<UserIcon
size={24}
fill={isActive('/mypage') ? 'currentColor' : 'none'}
/>
</div>
<p className="caption1 mt-[4px] text-center font-normal text-gray7">
<p className="caption1 mt-[3px] text-center font-normal text-gray7">
내정보
</p>
</div>
Expand Down
6 changes: 4 additions & 2 deletions src/components/common/tab/Tab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,16 @@ const Tab = ({ lists, contents }: TabProps) => {
defaultValue="tab0"
onValueChange={handleTabChange}>
<Tabs.List
className="border-b-1 no-scrollbar flex shrink-0 overflow-x-scroll"
className={`${
!isDayTab && 'justify-center'
} border-b-1 no-scrollbar flex shrink-0 overflow-x-scroll`}
aria-label="Manage your account">
{lists.map((list, index) => {
return (
<Tabs.Trigger
key={index}
className={`${
isDayTab ? 'caption1' : 'headline1 flex-1'
isDayTab ? 'caption1' : 'headline1 w-[136px]'
} flex min-w-[57px] cursor-pointer select-none items-center justify-center border-b-2 border-solid border-gray2 py-[8px] leading-none text-gray4 outline-none data-[state=active]:border-b-2 data-[state=active]:border-solid data-[state=active]:border-black data-[state=active]:text-black`}
value={`tab${index}`}>
{list}
Expand Down