diff --git a/MVMCoreUI/Atomic/Atoms/FormFields/Tags/Tag.swift b/MVMCoreUI/Atomic/Atoms/FormFields/Tags/Tag.swift index c962f8c9..bc905a79 100644 --- a/MVMCoreUI/Atomic/Atoms/FormFields/Tags/Tag.swift +++ b/MVMCoreUI/Atomic/Atoms/FormFields/Tags/Tag.swift @@ -8,11 +8,18 @@ import Foundation + @objcMembers open class Tag: View { + //-------------------------------------------------- + // MARK: - Outlets + //-------------------------------------------------- - public let label = Label.createLabelRegularBodySmall(true) + public let label = Label(fontStyle: .RegularBodySmall) + //-------------------------------------------------- // MARK: - MVMCoreViewProtocol + //-------------------------------------------------- + open override func setupView() { super.setupView() layer.borderColor = UIColor.mvmCoolGray6.cgColor @@ -22,9 +29,10 @@ import Foundation NSLayoutConstraint.constraintPinSubview(label, pinTop: true, topConstant: 13, pinBottom: true, bottomConstant: 13, pinLeft: true, leftConstant: 15, pinRight: true, rightConstant: 15) } - // MARK: - MoleculeViewProtocol open override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) { + guard let model = model as? TagModel else { return } + label.set(with: model.label, delegateObject, additionalData) } @@ -36,6 +44,6 @@ import Foundation open override func reset() { super.reset() label.reset() - label.styleRegularBodySmall(true) + label.setFontStyle(.RegularBodySmall) } }