Skip to content

Commit 5e9937b

Browse files
committed
Fix bookmark icon
1 parent 2da4a49 commit 5e9937b

File tree

5 files changed

+23
-27
lines changed

5 files changed

+23
-27
lines changed
Lines changed: 3 additions & 2 deletions
Loading

frontend/src/pages/Home/components/ReportItem/ReportItem.scss

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -51,21 +51,19 @@
5151
display: flex;
5252
align-items: center;
5353
justify-content: center;
54+
background-color: #FFFFFF;
55+
border-radius: 50%;
56+
transition: background-color 0.2s ease;
57+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
58+
59+
&--active {
60+
background-color: #435FF0;
61+
height: 34px;
62+
63+
}
5464

5565
&-icon {
56-
width: 15px;
5766
transition: all 0.2s ease;
58-
display: flex;
59-
align-items: center;
60-
justify-content: center;
61-
border-radius: 50%;
62-
padding: 11px 7px;
63-
64-
&--active {
65-
color: white;
66-
background-color: #4765ff;
67-
box-shadow: none;
68-
}
6967
}
7068
}
7169

frontend/src/pages/Home/components/ReportItem/ReportItem.tsx

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
import { IonIcon } from '@ionic/react';
21
import { format } from 'date-fns';
32
import { useTranslation } from 'react-i18next';
43
import { MedicalReport, ReportCategory } from 'common/models/medicalReport';
5-
import { bookmarkOutline } from 'ionicons/icons';
64
import './ReportItem.scss';
75

86
// Import SVG icons
97
import healthIcon from 'assets/icons/health.svg';
108
import brainIcon from 'assets/icons/brain.svg';
119
import heartIcon from 'assets/icons/heart.svg';
10+
import bookmarkIcon from 'assets/icons/bookmark.svg';
11+
import bookmarkFilledIcon from 'assets/icons/bookmark-filled.svg';
1212

1313
interface ReportItemProps {
1414
report: MedicalReport;
@@ -100,12 +100,14 @@ const ReportItem: React.FC<ReportItemProps> = ({
100100
</div>
101101

102102
{showBookmarkButton && (
103-
<div className="report-item__bookmark" onClick={handleBookmarkClick}>
104-
<IonIcon
105-
icon={bookmarkOutline}
106-
className={`report-item__bookmark-icon ${
107-
bookmarked ? 'report-item__bookmark-icon--active' : ''
108-
}`}
103+
<div
104+
className={`report-item__bookmark ${bookmarked ? 'report-item__bookmark--active' : ''}`}
105+
onClick={handleBookmarkClick}
106+
>
107+
<img
108+
src={bookmarked ? bookmarkFilledIcon : bookmarkIcon}
109+
alt={t('actions.bookmark', { ns: 'common', defaultValue: 'Bookmark' })}
110+
className="report-item__bookmark-icon"
109111
/>
110112
</div>
111113
)}

frontend/src/pages/Reports/ReportsListPage.scss

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@
2828
margin-right: 0.5rem;
2929
}
3030

31-
&__title-icon {
32-
// No margin-right needed since it's handled by the wrapper
33-
}
34-
3531
&__title {
3632
font-size: 1.25rem;
3733
font-weight: 600;

frontend/src/pages/Reports/ReportsListPage.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import {
99
IonLabel,
1010
IonSegment,
1111
IonSegmentButton,
12-
IonIcon,
1312
IonButton,
1413
IonToast,
1514
IonModal,

0 commit comments

Comments
 (0)