undo top labels bottom buttons view changes molecule delegates and spacing blocks Primary Button Molecule remove module name from swift files.
23 lines
993 B
Swift
23 lines
993 B
Swift
//
|
|
// PrimaryButtonViewMoleculeProtocolExtension.swift
|
|
// MVMCoreUI
|
|
//
|
|
// Created by Scott Pfeil on 2/12/19.
|
|
// Copyright © 2019 Verizon Wireless. All rights reserved.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
extension PrimaryButtonView: MVMCoreUIMoleculeViewProtocol {
|
|
public func setWithJSON(_ json: [AnyHashable : Any]?, delegate: NSObject?) {
|
|
let firstButtonMap = json?.optionalDictionaryForKey("FirstButton")
|
|
let secondButtonMap = json?.optionalDictionaryForKey("SecondButton")
|
|
if let backgroundColor = json?.optionalStringForKey("backgroundColor") {
|
|
self.backgroundColor = UIColor.mfGet(forHex: backgroundColor)
|
|
}
|
|
let actionDelegate = delegate as? MVMCoreActionDelegateProtocol & NSObjectProtocol
|
|
let buttonDelegate = delegate as? ButtonDelegateProtocol
|
|
setup(withPrimaryButtonMap: firstButtonMap, secondaryButtonMap: secondButtonMap, actionDelegate: actionDelegate, additionalData: nil, buttonDelegate: buttonDelegate)
|
|
}
|
|
}
|