Skip to content

Commit 6fef2cf

Browse files
committed
[refactor]: ic_heat_filled 아이콘 추가 및 적용(#26)
1 parent c5fd480 commit 6fef2cf

2 files changed

Lines changed: 13 additions & 3 deletions

File tree

app/src/main/java/com/texthip/thip/ui/myPage/component/SavedFeedCard.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import androidx.compose.material3.Text
1515
import androidx.compose.runtime.Composable
1616
import androidx.compose.ui.Alignment
1717
import androidx.compose.ui.Modifier
18+
import androidx.compose.ui.graphics.Color
1819
import androidx.compose.ui.graphics.painter.Painter
1920
import androidx.compose.ui.layout.ContentScale
2021
import androidx.compose.ui.res.painterResource
@@ -86,9 +87,9 @@ fun SavedFeedCard(
8687
) {
8788
Icon(
8889
modifier = Modifier.clickable { onLikeClick() },
89-
painter = painterResource(R.drawable.ic_heart),
90+
painter = painterResource(if (feedItem.isLiked) R.drawable.ic_heart_filled else R.drawable.ic_heart),
9091
contentDescription = null,
91-
tint = if (feedItem.isLiked) colors.Red else colors.White
92+
tint = Color.Unspecified
9293
)
9394
Text(
9495
text = feedItem.likeCount.toString(),
@@ -112,7 +113,7 @@ fun SavedFeedCard(
112113
modifier = Modifier.clickable { onBookmarkClick() },
113114
painter = painterResource(if (feedItem.isSaved) R.drawable.ic_save_filled else R.drawable.ic_save),
114115
contentDescription = null,
115-
tint = colors.White
116+
tint = Color.Unspecified
116117
)
117118
}
118119

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="24dp"
3+
android:height="24dp"
4+
android:viewportWidth="24"
5+
android:viewportHeight="24">
6+
<path
7+
android:pathData="M14.696,3C12.652,3 10.887,4.197 10,5.943C9.113,4.197 7.348,3 5.304,3C2.374,3 0,5.457 0,8.481C0,11.505 1.817,14.277 4.165,16.554C6.513,18.831 10,21 10,21C10,21 13.374,18.867 15.835,16.554C18.46,14.088 20,11.514 20,8.481C20,5.448 17.626,3 14.696,3Z"
8+
android:fillColor="#6868FF"/>
9+
</vector>

0 commit comments

Comments
 (0)