Merge branch 'feature/buttonWithImage' into 'develop'

Changed access specifier public to open for Button model class and static property to class property

See merge request BPHV_MIPS/mvm_core_ui!674
This commit is contained in:
Pfeil, Scott Robert 2021-02-23 09:37:29 -05:00
commit b943bed2d8

View File

@ -11,12 +11,14 @@ import UIKit
public typealias FacadeElements = (fill: UIColor?, text: UIColor?, border: UIColor?)
public class ButtonModel: ButtonModelProtocol, MoleculeModelProtocol, FormGroupWatcherFieldProtocol, EnableableModelProtocol {
open class ButtonModel: ButtonModelProtocol, MoleculeModelProtocol, FormGroupWatcherFieldProtocol, EnableableModelProtocol {
//--------------------------------------------------
// MARK: - Properties
//--------------------------------------------------
public static var identifier: String = "button"
//Making static property as class property so that subclasses can override getter function of the property
open class var identifier: String {
"button"
}
public var backgroundColor: Color?
public var accessibilityIdentifier: String?
public var title: String
@ -247,7 +249,7 @@ public class ButtonModel: ButtonModelProtocol, MoleculeModelProtocol, FormGroupW
}
}
public func encode(to encoder: Encoder) throws {
open func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encode(moleculeName, forKey: .moleculeName)
try container.encode(title, forKey: .title)