remove old junk
This commit is contained in:
parent
a925560ecb
commit
c2cc637c38
@ -24,34 +24,6 @@ open class PillButton: VDS.Button, MVMCoreUIViewConstrainingProtocol, MoleculeVi
|
|||||||
|
|
||||||
internal var onClickCancellable: Cancellable?
|
internal var onClickCancellable: Cancellable?
|
||||||
|
|
||||||
//--------------------------------------------------
|
|
||||||
// MARK: - Convenience
|
|
||||||
//--------------------------------------------------
|
|
||||||
|
|
||||||
@objc public convenience init(asPrimaryButton isPrimary: Bool, makeTiny istiny: Bool) {
|
|
||||||
let model = ButtonModel(with: "", action: ActionNoopModel())
|
|
||||||
model.style = isPrimary ? .primary : .secondary
|
|
||||||
model.size = istiny ? .small : .large
|
|
||||||
self.init(model: model, nil, nil)
|
|
||||||
}
|
|
||||||
|
|
||||||
/// The primary styling for a button. Should be used for main buttons
|
|
||||||
open func stylePrimary() {
|
|
||||||
viewModel = ButtonModel(primaryButtonWith: "", action: ActionNoopModel())
|
|
||||||
use = .primary
|
|
||||||
}
|
|
||||||
|
|
||||||
/// The secondary styling for a button. Should be used for secondary buttons
|
|
||||||
open func styleSecondary() {
|
|
||||||
viewModel = ButtonModel(secondaryButtonWith: "", action: ActionNoopModel())
|
|
||||||
use = .secondary
|
|
||||||
}
|
|
||||||
|
|
||||||
open override func setup() {
|
|
||||||
super.setup()
|
|
||||||
setupView()
|
|
||||||
}
|
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - VDSMoleculeViewProtocol
|
// MARK: - VDSMoleculeViewProtocol
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -91,6 +63,11 @@ open class PillButton: VDS.Button, MVMCoreUIViewConstrainingProtocol, MoleculeVi
|
|||||||
|
|
||||||
open func updateView(_ size: CGFloat) {}
|
open func updateView(_ size: CGFloat) {}
|
||||||
|
|
||||||
|
open override func setup() {
|
||||||
|
super.setup()
|
||||||
|
setupView()
|
||||||
|
}
|
||||||
|
|
||||||
open func setupView() {}
|
open func setupView() {}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
|
import VDS
|
||||||
|
|
||||||
@objcMembers open class TwoButtonView: View, MVMCoreUIViewConstrainingProtocol {
|
@objcMembers open class TwoButtonView: View, MVMCoreUIViewConstrainingProtocol {
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -29,9 +29,8 @@ import UIKit
|
|||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|
||||||
public func setDefaultAppearance() {
|
public func setDefaultAppearance() {
|
||||||
|
primaryButton.use = .primary
|
||||||
primaryButton.stylePrimary()
|
secondaryButton.use = .secondary
|
||||||
secondaryButton.styleSecondary()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
open override func updateView(_ size: CGFloat) {
|
open override func updateView(_ size: CGFloat) {
|
||||||
|
|||||||
@ -15,7 +15,7 @@ import Foundation
|
|||||||
|
|
||||||
public let headline = Label(fontStyle: .BoldBodySmall)
|
public let headline = Label(fontStyle: .BoldBodySmall)
|
||||||
public let body = Label(fontStyle: .RegularBodySmall)
|
public let body = Label(fontStyle: .RegularBodySmall)
|
||||||
public let button = PillButton(asPrimaryButton: false, makeTiny: true)
|
public let button = PillButton()
|
||||||
public let closeButton = NotificationXButton()
|
public let closeButton = NotificationXButton()
|
||||||
public var labelStack: Stack<StackModel>!
|
public var labelStack: Stack<StackModel>!
|
||||||
public var horizontalStack: Stack<StackModel>!
|
public var horizontalStack: Stack<StackModel>!
|
||||||
|
|||||||
@ -64,7 +64,7 @@
|
|||||||
|
|
||||||
headlineBody.headlineLabel.font = Styler.Font.BoldTitleMedium.getFont()
|
headlineBody.headlineLabel.font = Styler.Font.BoldTitleMedium.getFont()
|
||||||
headlineBody.messageLabel.font = Styler.Font.RegularMicro.getFont()
|
headlineBody.messageLabel.font = Styler.Font.RegularMicro.getFont()
|
||||||
button.styleSecondary()
|
button.use = .secondary
|
||||||
button.isHidden = false
|
button.isHidden = false
|
||||||
buttonHeadlinePadding = PaddingTwo
|
buttonHeadlinePadding = PaddingTwo
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user