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() {