-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
112 additions
and
9 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,15 @@ | ||
import Tab from '@components/common/tab/Tab'; | ||
|
||
const TripSectionTop = () => { | ||
return ( | ||
<div className="min-h-[800px]"> | ||
<div className="my-1">여정 생성 완료 페이지</div> | ||
<Tab | ||
lists={['우리의 여행취향', '우리의 관심목록']} | ||
contents={[<div>우리의 여행취향</div>, <div>우리의 관심목록</div>]} | ||
/> | ||
</div> | ||
); | ||
}; | ||
|
||
export default TripSectionTop; |
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,37 @@ | ||
import * as Tabs from '@radix-ui/react-tabs'; | ||
|
||
interface TabProps { | ||
lists: string[]; | ||
contents: React.ReactNode[]; | ||
} | ||
|
||
const Tab = ({ lists, contents }: TabProps) => ( | ||
<Tabs.Root className="flex w-full flex-col" defaultValue="tab0"> | ||
<Tabs.List | ||
className="border-b-1 flex shrink-0 px-5" | ||
aria-label="Manage your account"> | ||
{lists.map((list, index) => { | ||
return ( | ||
<Tabs.Trigger | ||
key={index} | ||
className="headline1 flex h-[45px] flex-1 cursor-pointer select-none items-center justify-center bg-white px-5 leading-none outline-none data-[state=active]:shadow-[inset_0_-1px_0_0,0_1px_0_0] data-[state=active]:shadow-current" | ||
value={`tab${index}`}> | ||
{list} | ||
</Tabs.Trigger> | ||
); | ||
})} | ||
</Tabs.List> | ||
{contents.map((content, index) => { | ||
return ( | ||
<Tabs.Content | ||
key={index} | ||
className="grow bg-white p-5 outline-none" | ||
value={`tab${index}`}> | ||
{content} | ||
</Tabs.Content> | ||
); | ||
})} | ||
</Tabs.Root> | ||
); | ||
|
||
export default Tab; |
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 |
---|---|---|
@@ -1,5 +1,15 @@ | ||
import Tab from '@components/common/tab/Tab'; | ||
|
||
const PlanTrip = () => { | ||
return <div>여행 계획 페이지</div>; | ||
return ( | ||
<> | ||
<div>여행 계획 페이지</div> | ||
<Tab | ||
lists={['Day1', 'Day2', 'Day3']} | ||
contents={[<div>Day1</div>, <div>Day2</div>, <div>Day3</div>]} | ||
/> | ||
</> | ||
); | ||
}; | ||
|
||
export default PlanTrip; |
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 |
---|---|---|
@@ -1,5 +1,11 @@ | ||
import TripSectionTop from '@components/Trip/TripSectionTop'; | ||
|
||
const Trip = () => { | ||
return <div>여정 생성 완료 페이지</div>; | ||
return ( | ||
<> | ||
<TripSectionTop /> | ||
</> | ||
); | ||
}; | ||
|
||
export default Trip; |
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