Updating default button style

This commit is contained in:
Sumanth Nadigadda 2022-05-07 01:46:41 +05:30
parent 9c3d211a81
commit 89bc6c72ab

View File

@ -85,6 +85,7 @@ open class ButtonModel: ButtonModelProtocol, MoleculeModelProtocol, FormGroupWat
public init(with title: String, action: ActionModelProtocol) {
self.title = title
self.action = action
setFacade(by: style ?? .primary)
}
public init(secondaryButtonWith title: String, action: ActionModelProtocol) {
@ -218,6 +219,8 @@ open class ButtonModel: ButtonModelProtocol, MoleculeModelProtocol, FormGroupWat
if let style = try typeContainer.decodeIfPresent(Styler.Button.Style.self, forKey: .style) {
self.style = style
setFacade(by: style)
} else {
setFacade(by: .primary)
}
if let size = try typeContainer.decodeIfPresent(Styler.Button.Size.self, forKey: .size) {