Skip to content

Commit e88b58f

Browse files
authored
Feat(client): 리마인드, 북마크 페이지 tooltip 구현 (#174)
* feat: tooltip 구현 * feat: info card * feat: info card 연결 * feat: 페이지에서 tooltip import * chore: 오타 수정
1 parent 1462660 commit e88b58f

File tree

5 files changed

+73
-0
lines changed

5 files changed

+73
-0
lines changed

apps/client/src/assets/card_img.svg

Lines changed: 20 additions & 0 deletions
Loading

apps/client/src/pages/myBookmark/MyBookmark.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import {
2222
import NoUnreadArticles from '@pages/myBookmark/components/noUnreadArticles/NoUnreadArticles';
2323
import FetchCard from '@pages/myBookmark/components/fetchCard/FetchCard';
2424
import { useInfiniteScroll } from '@shared/hooks/useInfiniteScroll';
25+
import Tooltip from '@shared/components/tooltip/Tooltip';
2526

2627
const MyBookmark = () => {
2728
const [activeBadge, setActiveBadge] = useState<'all' | 'notRead'>('all');
@@ -175,6 +176,7 @@ const MyBookmark = () => {
175176
isActive={activeBadge === 'notRead'}
176177
/>
177178
</div>
179+
<Tooltip />
178180

179181
{articlesToDisplay.length > 0 ? (
180182
<div

apps/client/src/pages/remind/Remind.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import { useQueryClient } from '@tanstack/react-query';
1818
import NoRemindArticles from './components/noRemindArticles/NoRemindArticles';
1919
import FetchCard from './components/fetchCard/FetchCard';
2020
import { useInfiniteScroll } from '@shared/hooks/useInfiniteScroll';
21+
import Tooltip from '@shared/components/tooltip/Tooltip';
2122

2223
const Remind = () => {
2324
const [isEditOpen, setIsEditOpen] = useState(false);
@@ -129,6 +130,7 @@ const Remind = () => {
129130
isActive={activeBadge === 'read'}
130131
/>
131132
</div>
133+
<Tooltip />
132134

133135
{articlesToDisplay.length > 0 ? (
134136
<div
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import CardImg from '@assets/card_img.svg';
2+
export default function InfoCard() {
3+
return (
4+
<div className="common-shadow bg-white-bg w-[24.6rem] rounded-[12px] px-[1.6rem] py-[2.4rem]">
5+
<p className="sub2-sb text-font-black-1 mb-[1.6rem] text-center">
6+
치삐가 고치고 있어요 <span aria-hidden>🚧</span>
7+
</p>
8+
9+
<div className="mb-[1.6rem] flex justify-center">
10+
<img src={CardImg} alt="메타 정보가 없을 때 표시되는 안내 이미지" />
11+
</div>
12+
13+
<p className="caption2-m text-font-gray-3">
14+
현재 제목과 이미지 자동 불러오기 기능은 개선 중이에요. 저장한 콘텐츠를
15+
쉽게 구분하려면, 메모에 직접 제목이나 키워드를 기록해 두면 더 편리해요.
16+
<span aria-hidden>📝</span>
17+
</p>
18+
</div>
19+
);
20+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import { Icon } from '@pinback/design-system/icons';
2+
import InfoCard from './InfoCard';
3+
4+
export default function Tooltip() {
5+
return (
6+
<div className="mt-[0.8rem] flex items-center">
7+
<p className="body3-r text-font-gray-3">
8+
일부 콘텐츠는 제목·이미지가 불러와지지 않을 수 있어요.
9+
</p>
10+
11+
<div className="relative inline-flex items-center">
12+
<button
13+
type="button"
14+
aria-describedby="info-card"
15+
className="peer rounded p-[0.4rem]"
16+
>
17+
<Icon name="ic_info" size={16} />
18+
</button>
19+
20+
<div
21+
id="info-card"
22+
className="pointer-events-none absolute left-0 top-[calc(100%+8px)] z-[100] opacity-0 transition-opacity duration-150 peer-hover:opacity-100 peer-focus-visible:opacity-100"
23+
>
24+
<InfoCard />
25+
</div>
26+
</div>
27+
</div>
28+
);
29+
}

0 commit comments

Comments
 (0)