diff --git a/core/ui/src/main/java/com/withpeace/withpeace/core/ui/bookmark/BookmarkButton.kt b/core/ui/src/main/java/com/withpeace/withpeace/core/ui/bookmark/BookmarkButton.kt index 093586d3..e23809c6 100644 --- a/core/ui/src/main/java/com/withpeace/withpeace/core/ui/bookmark/BookmarkButton.kt +++ b/core/ui/src/main/java/com/withpeace/withpeace/core/ui/bookmark/BookmarkButton.kt @@ -4,14 +4,36 @@ import androidx.compose.foundation.Image import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.res.painterResource +import androidx.compose.ui.tooling.preview.Preview +import com.withpeace.withpeace.core.designsystem.theme.WithpeaceTheme +import com.withpeace.withpeace.core.ui.R @Composable fun BookmarkButton( modifier: Modifier = Modifier, + isClick: Boolean = false, ) { Image( modifier = modifier, - painter = painterResource(id = com.withpeace.withpeace.core.ui.R.drawable.ic_empty_heart), + painter = painterResource( + id = if (isClick) R.drawable.ic_heart else com.withpeace.withpeace.core.ui.R.drawable.ic_empty_heart, + ), contentDescription = "찜하기", ) +} + +@Composable +@Preview() +fun BookmarkButtonPreview() { + WithpeaceTheme { + BookmarkButton() + } +} + +@Composable +@Preview() +fun BookmarkButtonClickedPreview() { + WithpeaceTheme { + BookmarkButton(isClick = true) + } } \ No newline at end of file