refactored atoms with style changes
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
ddb15e72f3
commit
28c15efba5
@ -19,6 +19,7 @@ import UIKit
|
||||
//--------------------------------------------------
|
||||
public private(set) var titleLabel: FormLabel = {
|
||||
let label = FormLabel()
|
||||
label.setFontStyle(.RegularMicro)
|
||||
label.setContentCompressionResistancePriority(.required, for: .vertical)
|
||||
return label
|
||||
}()
|
||||
@ -28,6 +29,7 @@ import UIKit
|
||||
/// Provides contextual information on the TextField.
|
||||
public private(set) var feedbackLabel: FormLabel = {
|
||||
let label = FormLabel()
|
||||
label.setFontStyle(.RegularMicro)
|
||||
label.setContentCompressionResistancePriority(.required, for: .vertical)
|
||||
return label
|
||||
}()
|
||||
@ -276,15 +278,13 @@ import UIKit
|
||||
|
||||
backgroundColor = .clear
|
||||
isAccessibilityElement = false
|
||||
titleLabel.font = Styler.Font.RegularMicro.getFont()
|
||||
titleLabel.textColor = .mvmBlack
|
||||
feedbackLabel.font = Styler.Font.RegularMicro.getFont()
|
||||
feedbackLabel.textColor = .mvmBlack
|
||||
errorLabel.font = Styler.Font.RegularMicro.getFont()
|
||||
errorLabel.textColor = .mvmBlack
|
||||
titleLabel.setFontStyle(.RegularMicro)
|
||||
feedbackLabel.setFontStyle(.RegularMicro)
|
||||
errorLabel.setFontStyle(.RegularMicro)
|
||||
titleLabel.text = nil
|
||||
feedbackLabel.text = nil
|
||||
errorLabel.text = nil
|
||||
entryFieldContainer.disableAllBorders = false
|
||||
feedbackLabel.text = nil
|
||||
entryFieldContainer.reset()
|
||||
entryFieldModel?.updateUI = nil
|
||||
}
|
||||
|
||||
@ -9,11 +9,7 @@
|
||||
import Foundation
|
||||
|
||||
/// Subclass of label that helps with different states
|
||||
public class FormLabel: Label {
|
||||
//properties used in setting label
|
||||
private var delegateObject: MVMCoreUIDelegateObject?
|
||||
private var additionalData: [AnyHashable: Any]?
|
||||
|
||||
public class FormLabel: Label {
|
||||
//models that drive the label UI
|
||||
private var formModel: FormLabelModel!
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ import Foundation
|
||||
//--------------------------------------------------
|
||||
// MARK: - Outlets
|
||||
//--------------------------------------------------
|
||||
public let planLabel = Label()
|
||||
public let planLabel = Label(fontStyle: .BoldFeatureXLarge)
|
||||
public let headline = Label(fontStyle: .BoldTitleLarge)
|
||||
public let subHeadline = Label(fontStyle: .RegularTitleLarge)
|
||||
public let body = Label(fontStyle: .RegularBodySmall)
|
||||
@ -33,8 +33,6 @@ import Foundation
|
||||
//-------------------------------------------------------
|
||||
open override func setupView() {
|
||||
super.setupView()
|
||||
planLabel.font = MFStyler.getMVA3FontSize(96, bold: true)
|
||||
planLabel.standardFontSize = 96
|
||||
addSubview(stack)
|
||||
planLabel.setContentCompressionResistancePriority(.required, for: .horizontal)
|
||||
planLabel.setContentHuggingPriority(.defaultHigh, for: .vertical)
|
||||
@ -94,8 +92,7 @@ import Foundation
|
||||
open override func reset() {
|
||||
super.reset()
|
||||
stack.reset()
|
||||
planLabel.font = MFStyler.getMVA3FontSize(96, bold: true)
|
||||
planLabel.standardFontSize = 96
|
||||
planLabel.setFontStyle(.BoldFeatureXLarge)
|
||||
headline.setFontStyle(.BoldTitleLarge)
|
||||
subHeadline.setFontStyle(.RegularTitleLarge)
|
||||
body.setFontStyle(.RegularBodySmall)
|
||||
|
||||
@ -76,8 +76,8 @@ import UIKit
|
||||
|
||||
private func setDefaultState() {
|
||||
|
||||
headlineBodyButton.headlineBody.headlineLabel.font = MFStyler.fontBoldTitleMedium()
|
||||
headlineBodyButton.headlineBody.messageLabel.font = MFStyler.fontRegularMicro()
|
||||
headlineBodyButton.headlineBody.headlineLabel.setFontStyle(.BoldTitleMedium)
|
||||
headlineBodyButton.headlineBody.messageLabel.setFontStyle(.RegularMicro)
|
||||
imageLoader.imageView.contentMode = .scaleAspectFit
|
||||
imageLoader.addSizeConstraintsForAspectRatio = true
|
||||
buttonHeaderPadding = PaddingTwo
|
||||
|
||||
@ -14,7 +14,7 @@ import UIKit
|
||||
// MARK: - Properties
|
||||
//--------------------------------------------------
|
||||
|
||||
public let label = Label(fontStyle: .BoldBodySmall)
|
||||
public let label = Label().with { $0.font = Styler.Font.BoldFeatureXLarge.getFont() }
|
||||
public let toggle = Toggle()
|
||||
|
||||
//--------------------------------------------------
|
||||
|
||||
@ -62,8 +62,8 @@
|
||||
|
||||
private func defaultState() {
|
||||
|
||||
headlineBody.headlineLabel.font = Styler.Font.BoldTitleMedium.getFont()
|
||||
headlineBody.messageLabel.font = Styler.Font.RegularMicro.getFont()
|
||||
headlineBody.headlineLabel.setFontStyle(.BoldTitleMedium)
|
||||
headlineBody.messageLabel.setFontStyle(.RegularMicro)
|
||||
button.use = .secondary
|
||||
button.isHidden = false
|
||||
buttonHeadlinePadding = PaddingTwo
|
||||
|
||||
Loading…
Reference in New Issue
Block a user