-
Notifications
You must be signed in to change notification settings - Fork 0
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
권기범
authored and
권기범
committed
Oct 31, 2023
1 parent
b101732
commit 2d5db14
Showing
4 changed files
with
33 additions
and
15 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
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,9 @@ | ||
interface TabProps { | ||
children?: React.ReactNode | ||
} | ||
|
||
const Tab = ({ children }: TabProps) => { | ||
return <div className="flex transition ease-in-out">{children}</div> | ||
} | ||
|
||
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { cls } from '@/utils' | ||
|
||
interface TabItemProps { | ||
active?: boolean | ||
text?: string | ||
onClick: (_e?: React.MouseEvent<HTMLButtonElement>) => void | ||
} | ||
|
||
const TabItem = ({ active, text, onClick }: TabItemProps) => { | ||
return ( | ||
<div | ||
onClick={() => { | ||
onClick() | ||
}} | ||
className={cls( | ||
active ? 'border-emerald-500' : 'border-slate-300', | ||
`text-gray9 flex w-[100%] cursor-pointer items-center justify-center border-b py-4 font-['Pretendard'] text-sm font-bold transition ease-in-out`, | ||
)}> | ||
{text} | ||
</div> | ||
) | ||
} | ||
|
||
export default TabItem |