-
Notifications
You must be signed in to change notification settings - Fork 1
Feat(client): tooltip component 구현 #262
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
Changes from all commits
f161915
1d85fda
1c12c78
6e3bdd6
c43dff7
3a2e3a0
a759407
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
| @@ -1,5 +1,38 @@ | ||||||||
| import { Icon } from '@pinback/design-system/icons'; | ||||||||
| import { Balloon } from '@shared/components/balloon/Balloon'; | ||||||||
|
|
||||||||
| const JobPins = () => { | ||||||||
| return <div>관심 직무 핀 페이지</div>; | ||||||||
| return ( | ||||||||
| <div> | ||||||||
| {' '} | ||||||||
| <Balloon variant="main" side="bottom"> | ||||||||
| <div className="text-lg font-semibold">치삐가 방금</div> | ||||||||
|
|
||||||||
| <div className="text-sm opacity-90">도토리 1개를 모았어요!</div> | ||||||||
| </Balloon> | ||||||||
| <Balloon variant="gray" side="left" onClose={() => alert('닫힘')}> | ||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
🔧 수정 제안- <Balloon variant="gray" side="left" onClose={() => alert('닫힘')}>
+ {/* TODO: 닫기 상태 관리 로직 구현 후 onClose 연결 필요 */}
+ <Balloon variant="gray" side="left">📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||
| <div className="text-lg font-semibold">치삐가 방금</div> | ||||||||
|
|
||||||||
| <div className="text-sm opacity-90">도토리 1개를 모았어요!</div> | ||||||||
| </Balloon> | ||||||||
| <Balloon variant="gray" side="left"> | ||||||||
| <Icon name="ic_info" size={16} /> | ||||||||
| <div className="text-sm opacity-90">도토리 1개를 모았어요!</div> | ||||||||
| </Balloon> | ||||||||
| <Balloon variant="main" side="bottom"> | ||||||||
| <div className="flex items-center gap-3"> | ||||||||
| {/* 캐릭터 이미지 */} | ||||||||
| <Icon name="chippi_profile" size={40} /> | ||||||||
|
|
||||||||
| {/* 텍스트 영역 */} | ||||||||
| <div className="flex flex-col"> | ||||||||
| <div className="text-[18px] font-semibold">치삐가 방금</div> | ||||||||
| <div className="text-[16px]">도토리 1개를 모았어요!</div> | ||||||||
| </div> | ||||||||
| </div> | ||||||||
| </Balloon> | ||||||||
| </div> | ||||||||
| ); | ||||||||
|
Comment on lines
+5
to
+35
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Check JobPins router registration and actual usage
echo "=== JobPins 라우터 등록 확인 ==="
rg -n "JobPins" --type=tsx --type=ts -g '!node_modules' -C 3
echo "=== 관심 직무 핀 관련 API 연결 여부 ==="
rg -n "jobPin" --type=tsx --type=ts -g '!node_modules' -C 2Repository: Pinback-Team/pinback-client Length of output: 198 🏁 Script executed: #!/bin/bash
# Corrected search - JobPins references in TypeScript/TSX files
echo "=== JobPins 라우터 등록 확인 ==="
rg "JobPins" -g "*.ts" -g "*.tsx" -C 3
echo "=== jobPin 또는 관심 직무 핀 관련 API 연결 여부 ==="
rg "jobPin|job-pin|pin.*job" -g "*.ts" -g "*.tsx" -C 2
echo "=== JobPins 파일 자체 확인 ==="
cat -n apps/client/src/pages/jobPins/JobPins.tsx | head -50Repository: Pinback-Team/pinback-client Length of output: 7832 JobPins 페이지가 Balloon 컴포넌트 데모 코드로만 구성되어 있고 실제 기능이 없음 현재 파일은 라우터에 등록되어 있고 사이드바에서 "관심 직무 핀" 메뉴로 접근 가능하지만, 콘텐츠는 🤖 Prompt for AI Agents |
||||||||
| }; | ||||||||
|
|
||||||||
| export default JobPins; | ||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,55 @@ | ||||||||||||||||||||||
| import { Icon } from '@pinback/design-system/icons'; | ||||||||||||||||||||||
| import { cn } from '@pinback/design-system/utils'; | ||||||||||||||||||||||
| import { ReactNode } from 'react'; | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| type BalloonVariant = 'gray' | 'main'; | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| interface BalloonProps { | ||||||||||||||||||||||
| variant?: BalloonVariant; | ||||||||||||||||||||||
| side?: 'top' | 'bottom' | 'left' | 'right'; | ||||||||||||||||||||||
| onClose?: () => void; | ||||||||||||||||||||||
| children: ReactNode; | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||
|
|
||||||||||||||||||||||
| export function Balloon({ | ||||||||||||||||||||||
| variant = 'gray', | ||||||||||||||||||||||
| side = 'bottom', | ||||||||||||||||||||||
| onClose, | ||||||||||||||||||||||
| children, | ||||||||||||||||||||||
| }: BalloonProps) { | ||||||||||||||||||||||
| const variantStyle = { | ||||||||||||||||||||||
| gray: 'bg-gray900 text-white', | ||||||||||||||||||||||
| main: 'bg-main500 text-white', | ||||||||||||||||||||||
| }; | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| return ( | ||||||||||||||||||||||
| <div className="relative inline-block"> | ||||||||||||||||||||||
| <div | ||||||||||||||||||||||
| className={cn( | ||||||||||||||||||||||
| 'relative flex items-start gap-3 rounded-[4px] p-[1.2rem]', | ||||||||||||||||||||||
| variantStyle[variant] | ||||||||||||||||||||||
| )} | ||||||||||||||||||||||
| > | ||||||||||||||||||||||
| <div className="flex-1">{children}</div> | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| {onClose && ( | ||||||||||||||||||||||
| <button type="button" onClick={onClose}> | ||||||||||||||||||||||
| <Icon name="ic_close" size={16} /> | ||||||||||||||||||||||
| </button> | ||||||||||||||||||||||
| )} | ||||||||||||||||||||||
|
Comment on lines
35
to
39
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 닫기 버튼에
♿ 수정 제안- <button onClick={onClose}>
+ <button type="button" aria-label="닫기" onClick={onClose}>
<Icon name="ic_close" size={16} />
</button>📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||
| </div> | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| {/* 꼬리 */} | ||||||||||||||||||||||
| <div | ||||||||||||||||||||||
| className={cn( | ||||||||||||||||||||||
| 'absolute h-[12px] w-[12px] rotate-45', | ||||||||||||||||||||||
| variantStyle[variant], | ||||||||||||||||||||||
| side === 'bottom' && '-bottom-1 left-1/2 -translate-x-1/2', | ||||||||||||||||||||||
| side === 'top' && '-top-1 left-1/2 -translate-x-1/2', | ||||||||||||||||||||||
| side === 'left' && '-left-1 top-1/2 -translate-y-1/2', | ||||||||||||||||||||||
| side === 'right' && '-right-1 top-1/2 -translate-y-1/2' | ||||||||||||||||||||||
| )} | ||||||||||||||||||||||
| /> | ||||||||||||||||||||||
| </div> | ||||||||||||||||||||||
| ); | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
불필요한
{' '}제거<div>직후의{' '}는 렌더링에 아무런 의미 없는 공백 문자이며, 코드 편집 중 발생한 아티팩트로 보입니다. 제거해 주세요.🧹 수정 제안
return ( <div> - {' '} <Balloon variant="main" side="bottom">📝 Committable suggestion
🤖 Prompt for AI Agents