From 28c8c5216656f0041903edc1c51f8cd38dc640ca Mon Sep 17 00:00:00 2001 From: Lekshmi S Date: Thu, 25 Jun 2020 19:04:23 +0530 Subject: [PATCH 1/2] Added top and bottom padding for H2 header molecule. --- .../Headers/H2/HeadersH2PricingTwoRowsModel.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MVMCoreUI/Atomic/Molecules/DesignedComponents/Headers/H2/HeadersH2PricingTwoRowsModel.swift b/MVMCoreUI/Atomic/Molecules/DesignedComponents/Headers/H2/HeadersH2PricingTwoRowsModel.swift index 219f539f..ff0955e7 100644 --- a/MVMCoreUI/Atomic/Molecules/DesignedComponents/Headers/H2/HeadersH2PricingTwoRowsModel.swift +++ b/MVMCoreUI/Atomic/Molecules/DesignedComponents/Headers/H2/HeadersH2PricingTwoRowsModel.swift @@ -40,6 +40,8 @@ public class HeadersH2PricingTwoRowsModel: HeaderModel, MoleculeModelProtocol { //-------------------------------------------------- public override func setDefaults() { super.setDefaults() + topPadding = PaddingDefaultVerticalSpacing3 + bottomPadding = PaddingDefaultVerticalSpacing3 subBody?.attributes = [LabelAttributeStrikeThroughModel(0, subBody?.text.count ?? 0)] subBody2?.attributes = [LabelAttributeStrikeThroughModel(0, subBody2?.text.count ?? 0)] subBody3?.attributes = [LabelAttributeStrikeThroughModel(0, subBody3?.text.count ?? 0)] From 625bc1ca013d329f81ab344ba62cea8400122365 Mon Sep 17 00:00:00 2001 From: "Pfeil, Scott Robert" Date: Mon, 29 Jun 2020 15:06:14 -0400 Subject: [PATCH 2/2] Modernize variable --- .../Headers/H2/HeadersH2ButtonsModel.swift | 8 ++++++-- .../Headers/H2/HeadersH2NoButtonsBodyTextModel.swift | 8 ++++++-- .../Headers/H2/HeadersH2PricingTwoRowsModel.swift | 8 ++++++-- .../Headers/H2/HeadersH2TinyButtonModel.swift | 8 ++++++-- 4 files changed, 24 insertions(+), 8 deletions(-) diff --git a/MVMCoreUI/Atomic/Molecules/DesignedComponents/Headers/H2/HeadersH2ButtonsModel.swift b/MVMCoreUI/Atomic/Molecules/DesignedComponents/Headers/H2/HeadersH2ButtonsModel.swift index 3cb09a0f..d3ea7497 100644 --- a/MVMCoreUI/Atomic/Molecules/DesignedComponents/Headers/H2/HeadersH2ButtonsModel.swift +++ b/MVMCoreUI/Atomic/Molecules/DesignedComponents/Headers/H2/HeadersH2ButtonsModel.swift @@ -33,9 +33,13 @@ public class HeadersH2ButtonsModel: HeaderModel, MoleculeModelProtocol { //-------------------------------------------------- public override func setDefaults() { + if topPadding == nil { + topPadding = Padding.Component.VerticalMarginSpacing + } + if bottomPadding == nil { + bottomPadding = Padding.Component.VerticalMarginSpacing + } super.setDefaults() - topPadding = PaddingDefaultVerticalSpacing3 - bottomPadding = PaddingDefaultVerticalSpacing3 } //-------------------------------------------------- diff --git a/MVMCoreUI/Atomic/Molecules/DesignedComponents/Headers/H2/HeadersH2NoButtonsBodyTextModel.swift b/MVMCoreUI/Atomic/Molecules/DesignedComponents/Headers/H2/HeadersH2NoButtonsBodyTextModel.swift index a6cfc0ce..96d30730 100644 --- a/MVMCoreUI/Atomic/Molecules/DesignedComponents/Headers/H2/HeadersH2NoButtonsBodyTextModel.swift +++ b/MVMCoreUI/Atomic/Molecules/DesignedComponents/Headers/H2/HeadersH2NoButtonsBodyTextModel.swift @@ -27,9 +27,13 @@ public class HeadersH2NoButtonsBodyTextModel: HeaderModel, MoleculeModelProtocol } public override func setDefaults() { + if topPadding == nil { + topPadding = Padding.Component.VerticalMarginSpacing + } + if bottomPadding == nil { + bottomPadding = Padding.Component.VerticalMarginSpacing + } super.setDefaults() - topPadding = PaddingDefaultVerticalSpacing3 - bottomPadding = PaddingDefaultVerticalSpacing3 } //-------------------------------------------------- diff --git a/MVMCoreUI/Atomic/Molecules/DesignedComponents/Headers/H2/HeadersH2PricingTwoRowsModel.swift b/MVMCoreUI/Atomic/Molecules/DesignedComponents/Headers/H2/HeadersH2PricingTwoRowsModel.swift index ff0955e7..01bd72e4 100644 --- a/MVMCoreUI/Atomic/Molecules/DesignedComponents/Headers/H2/HeadersH2PricingTwoRowsModel.swift +++ b/MVMCoreUI/Atomic/Molecules/DesignedComponents/Headers/H2/HeadersH2PricingTwoRowsModel.swift @@ -39,9 +39,13 @@ public class HeadersH2PricingTwoRowsModel: HeaderModel, MoleculeModelProtocol { // MARK: - Methods //-------------------------------------------------- public override func setDefaults() { + if topPadding == nil { + topPadding = Padding.Component.VerticalMarginSpacing + } + if bottomPadding == nil { + bottomPadding = Padding.Component.VerticalMarginSpacing + } super.setDefaults() - topPadding = PaddingDefaultVerticalSpacing3 - bottomPadding = PaddingDefaultVerticalSpacing3 subBody?.attributes = [LabelAttributeStrikeThroughModel(0, subBody?.text.count ?? 0)] subBody2?.attributes = [LabelAttributeStrikeThroughModel(0, subBody2?.text.count ?? 0)] subBody3?.attributes = [LabelAttributeStrikeThroughModel(0, subBody3?.text.count ?? 0)] diff --git a/MVMCoreUI/Atomic/Molecules/DesignedComponents/Headers/H2/HeadersH2TinyButtonModel.swift b/MVMCoreUI/Atomic/Molecules/DesignedComponents/Headers/H2/HeadersH2TinyButtonModel.swift index 55c2c6e4..d4edfd38 100644 --- a/MVMCoreUI/Atomic/Molecules/DesignedComponents/Headers/H2/HeadersH2TinyButtonModel.swift +++ b/MVMCoreUI/Atomic/Molecules/DesignedComponents/Headers/H2/HeadersH2TinyButtonModel.swift @@ -33,9 +33,13 @@ public class HeadersH2TinyButtonModel: HeaderModel, MoleculeModelProtocol { //-------------------------------------------------- public override func setDefaults() { + if topPadding == nil { + topPadding = Padding.Component.VerticalMarginSpacing + } + if bottomPadding == nil { + bottomPadding = Padding.Component.VerticalMarginSpacing + } super.setDefaults() - topPadding = PaddingDefaultVerticalSpacing3 - bottomPadding = PaddingDefaultVerticalSpacing3 button.style = .secondary button.size = .tiny }