-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: 필요 svg 아이콘 추가 * feat: 공통 레이아웃으로 서비스 width 제어 * refactor: 리액트 라우터 레이아웃 설정 * refactor: 공통 레이아웃 설정에 따른 css 조정 * feat: 네비바 형태 구현 * feat: 모달 max w값 재설정
- Loading branch information
Showing
11 changed files
with
115 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
import Button from '@/components/commons/Button'; | ||
import HomeIcon from '@/assets/icon/homeIcon.svg?react'; | ||
import MatchIcon from '@/assets/icon/matchIcon.svg?react'; | ||
import FriendIcon from '@/assets/icon/friendsIcon.svg?react'; | ||
|
||
interface NavbarProps { | ||
modalContent: { | ||
home: boolean; | ||
match: boolean; | ||
friend: boolean; | ||
}; | ||
setModalContent: (content: { | ||
home: boolean; | ||
match: boolean; | ||
friend: boolean; | ||
}) => void; | ||
} | ||
|
||
const Navbar = ({ modalContent, setModalContent }: NavbarProps) => { | ||
return ( | ||
<nav className="flex justify-between items-center bg-neutral fixed left-0 right-0 bottom-0 max-w-[430px] w-full h-[64px] px-8 mx-auto"> | ||
<Button | ||
variant="icon" | ||
className="flex flex-col items-center justify-center gap-1" | ||
onClick={() => | ||
setModalContent({ home: true, match: false, friend: false }) | ||
} | ||
> | ||
<HomeIcon | ||
className={modalContent.home ? 'text-[#ffffff]' : 'text-[#838383]'} | ||
/> | ||
<span | ||
className={`text-[10px] ${modalContent.home ? 'text-white' : 'text-textDarkGray'}`} | ||
> | ||
홈 | ||
</span> | ||
</Button> | ||
<Button | ||
variant="icon" | ||
className="flex flex-col items-center justify-center gap-1" | ||
onClick={() => | ||
setModalContent({ home: false, match: true, friend: false }) | ||
} | ||
> | ||
<MatchIcon | ||
className={modalContent.match ? 'text-[#ffffff]' : 'text-[#838383]'} | ||
/> | ||
<span | ||
className={`text-[10px] ${modalContent.match ? 'text-white' : 'text-textDarkGray'}`} | ||
> | ||
수동매칭 | ||
</span> | ||
</Button> | ||
<Button | ||
variant="icon" | ||
className="flex flex-col items-center justify-center gap-1" | ||
onClick={() => | ||
setModalContent({ home: false, match: false, friend: true }) | ||
} | ||
> | ||
<FriendIcon | ||
className={modalContent.friend ? 'text-[#ffffff]' : 'text-[#838383]'} | ||
/> | ||
<span | ||
className={`text-[10px] ${modalContent.friend ? 'text-white' : 'text-textDarkGray'}`} | ||
> | ||
친구 | ||
</span> | ||
</Button> | ||
</nav> | ||
); | ||
}; | ||
|
||
export default Navbar; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import Navbar from '@/components/home/Navbar'; | ||
import { useState } from 'react'; | ||
|
||
const HomePage = () => { | ||
const [modalContent, setModalContent] = useState({ | ||
home: true, | ||
match: false, | ||
friend: false, | ||
}); | ||
|
||
return ( | ||
<section className="w-full flex-1"> | ||
<Navbar modalContent={modalContent} setModalContent={setModalContent} /> | ||
</section> | ||
); | ||
}; | ||
|
||
export default HomePage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters