diff --git a/MVMCoreUI/Atomic/Molecules/DesignedComponents/Headers/H1/HeadersH1NoButtonsBodyTextModel.swift b/MVMCoreUI/Atomic/Molecules/DesignedComponents/Headers/H1/HeadersH1NoButtonsBodyTextModel.swift index 97d635a1..b8d5e475 100644 --- a/MVMCoreUI/Atomic/Molecules/DesignedComponents/Headers/H1/HeadersH1NoButtonsBodyTextModel.swift +++ b/MVMCoreUI/Atomic/Molecules/DesignedComponents/Headers/H1/HeadersH1NoButtonsBodyTextModel.swift @@ -92,19 +92,31 @@ public struct DeprecatedHeadlineBodyHelper { public func createTitleLockupModel(defaultStyle: HeadlineBodyModel.Style = .header, headlineBody: HeadlineBodyModel) throws -> TitleLockupModel { guard let headline = headlineBody.headline else { throw ModelRegistry.Error.decoderOther(message: "headline is required for this use case.") } let body = headlineBody.body + var defaultHeadlineStyle: Styler.Font + var defaultBodyStyle: Styler.Font switch headlineBody.style ?? defaultStyle { case .landingHeader: - headline.fontStyle = Styler.Font.RegularTitle2XLarge - body?.fontStyle = Styler.Font.RegularTitleMedium + defaultHeadlineStyle = Styler.Font.RegularTitle2XLarge + defaultBodyStyle = Styler.Font.RegularTitleMedium case .itemHeader: - headline.fontStyle = Styler.Font.BoldTitleLarge - body?.fontStyle = Styler.Font.RegularBodyLarge + defaultHeadlineStyle = Styler.Font.BoldTitleLarge + defaultBodyStyle = Styler.Font.RegularBodyLarge default: - headline.fontStyle = Styler.Font.RegularTitleXLarge - body?.fontStyle = Styler.Font.RegularTitleMedium + defaultHeadlineStyle = Styler.Font.RegularTitleXLarge + defaultBodyStyle = Styler.Font.RegularTitleMedium + } + if headline.fontStyle == nil { + headline.fontStyle = defaultHeadlineStyle + } + if body?.fontStyle == nil { + body?.fontStyle = defaultBodyStyle } let model = TitleLockupModel(title: headline, subTitle: body) model.id = headlineBody.id + if let textAlignment = headline.textAlignment ?? body?.textAlignment, + textAlignment == .center { + model.textAlignment = .center + } return model } diff --git a/MVMCoreUI/Atomic/Molecules/Items/CarouselItem.swift b/MVMCoreUI/Atomic/Molecules/Items/CarouselItem.swift index 301a2274..509c9e61 100644 --- a/MVMCoreUI/Atomic/Molecules/Items/CarouselItem.swift +++ b/MVMCoreUI/Atomic/Molecules/Items/CarouselItem.swift @@ -22,7 +22,7 @@ open class CarouselItem: MoleculeCollectionViewCell, CarouselItemProtocol { open override func setupView() { super.setupView() - clipsToBounds = true + clipsToBounds = false // Covers the card when peaking. peakingCover.backgroundColor = .white diff --git a/MVMCoreUI/Atomic/Organisms/Carousel/Carousel.swift b/MVMCoreUI/Atomic/Organisms/Carousel/Carousel.swift index 18d65559..914e6427 100644 --- a/MVMCoreUI/Atomic/Organisms/Carousel/Carousel.swift +++ b/MVMCoreUI/Atomic/Organisms/Carousel/Carousel.swift @@ -125,6 +125,7 @@ open class Carousel: View { collectionView.dataSource = self collectionView.delegate = self collectionView.bounces = false + collectionView.clipsToBounds = false addSubview(collectionView) bottomPin = NSLayoutConstraint.constraintPinSubview(toSuperview: collectionView)?[ConstraintBot] as? NSLayoutConstraint collectionViewHeight = collectionView.heightAnchor.constraint(equalToConstant: 300)