diff --git a/MVMCoreUI/Atomic/Atoms/Buttons/PillButton.swift b/MVMCoreUI/Atomic/Atoms/Buttons/PillButton.swift index 7960fd99..84600397 100644 --- a/MVMCoreUI/Atomic/Atoms/Buttons/PillButton.swift +++ b/MVMCoreUI/Atomic/Atoms/Buttons/PillButton.swift @@ -43,6 +43,7 @@ open class PillButton: Button, MVMCoreUIViewConstrainingProtocol { @objc public convenience init(asPrimaryButton isPrimary: Bool, makeTiny istiny: Bool) { self.init() + model = ButtonModel.init(with: "", action: ActionOpenPageModel(pageType: "noop")) buttonSize = istiny ? .tiny : .standard isPrimary ? stylePrimary() : styleSecondary() } @@ -90,6 +91,8 @@ open class PillButton: Button, MVMCoreUIViewConstrainingProtocol { if buttonModel?.style == .primary { layer.borderWidth = 0 + } else if buttonModel?.style == .secondary { + layer.borderWidth = 1 } if let titleColor = buttonModel?.enabledColors.text { @@ -111,7 +114,6 @@ open class PillButton: Button, MVMCoreUIViewConstrainingProtocol { } if let borderColor = buttonModel?.enabledColors.border { - layer.borderWidth = 1 self.borderColor = borderColor } } else { @@ -120,7 +122,6 @@ open class PillButton: Button, MVMCoreUIViewConstrainingProtocol { } if let borderColor = buttonModel?.disabledColors.border { - layer.borderWidth = 1 self.borderColor = borderColor } } @@ -160,7 +161,6 @@ open class PillButton: Button, MVMCoreUIViewConstrainingProtocol { guard let model = model as? ButtonModel else { return } - style() setTitle(model.title, for: .normal) if let accessibilityText = model.accessibilityText { accessibilityLabel = accessibilityText