From 5c4972a563ea9e54dfcce16346c24209cb8d1e23 Mon Sep 17 00:00:00 2001 From: doyeonk429 <80318425+doyeonk429@users.noreply.github.com> Date: Sun, 9 Nov 2025 11:00:04 +0900 Subject: [PATCH] =?UTF-8?q?[BOOK-429]=20feat:=20thumbnail=20image=EC=97=90?= =?UTF-8?q?=20border=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Summary/BKBookSummaryView.swift | 20 +++++++++++++++++++ .../MainFlow/Home/View/HomeCardCell.swift | 3 +++ 2 files changed, 23 insertions(+) diff --git a/src/Projects/BKDesign/Sources/Components/Summary/BKBookSummaryView.swift b/src/Projects/BKDesign/Sources/Components/Summary/BKBookSummaryView.swift index 86cabe98..9ca5470b 100644 --- a/src/Projects/BKDesign/Sources/Components/Summary/BKBookSummaryView.swift +++ b/src/Projects/BKDesign/Sources/Components/Summary/BKBookSummaryView.swift @@ -41,6 +41,24 @@ public enum BKBookSummaryViewStyle { var showsExtraLabel: Bool { self == .big } var extraLabelTopOffset: CGFloat { showsExtraLabel ? BKInset.inset05 : .zero } var titleLabelNumberOfLines: Int { showsExtraLabel ? 2 : 1 } + + var thumbnailBorderWidth: CGFloat { + switch self { + case .regular, .big, .record, .compact: + return 1.0 + case .alreadyEnroll: + return 0.0 + } + } + + var thumbnailBorderColor: UIColor { + switch self { + case .regular, .big, .record, .compact: + return .bkBorderColor(.primary) + case .alreadyEnroll: + return .clear + } + } } public class BKBookSummaryView: UIView { @@ -251,6 +269,8 @@ public class BKBookSummaryView: UIView { publisherLabel.setText(text: publisher) thumbnail.clipsToBounds = true thumbnail.layer.cornerRadius = LayoutConstants.imageRadius + thumbnail.layer.borderWidth = style.thumbnailBorderWidth + thumbnail.layer.borderColor = style.thumbnailBorderColor.cgColor if let imageURL = image { thumbnail.kf.setImage(with: imageURL) diff --git a/src/Projects/BKPresentation/Sources/MainFlow/Home/View/HomeCardCell.swift b/src/Projects/BKPresentation/Sources/MainFlow/Home/View/HomeCardCell.swift index 99a9b91b..7f8d912b 100644 --- a/src/Projects/BKPresentation/Sources/MainFlow/Home/View/HomeCardCell.swift +++ b/src/Projects/BKPresentation/Sources/MainFlow/Home/View/HomeCardCell.swift @@ -99,6 +99,9 @@ final class HomeCardCell: UICollectionViewCell { thumbnail.clipsToBounds = true thumbnail.layer.masksToBounds = true thumbnail.layer.cornerRadius = BKRadius.xsmall + + thumbnail.layer.borderWidth = 1.0 + thumbnail.layer.borderColor = UIColor.bkBorderColor(.primary).cgColor } func setupView() {