diff --git a/MVMCoreUI/Atomic/Atoms/Selectors/Checkbox.swift b/MVMCoreUI/Atomic/Atoms/Selectors/Checkbox.swift index ed89af67..473e56df 100644 --- a/MVMCoreUI/Atomic/Atoms/Selectors/Checkbox.swift +++ b/MVMCoreUI/Atomic/Atoms/Selectors/Checkbox.swift @@ -24,11 +24,7 @@ import VDS var fieldKey: String? var fieldValue: JSONValue? var groupName: String? - - public var checkboxModel: CheckboxModel? { - viewModel - } - + /// Disables all selection logic when setting the value of isSelected, reducing it to a stored property. public var updateSelectionOnly: Bool = false @@ -154,7 +150,7 @@ import VDS public func updateView(_ size: CGFloat) {} private func performCheckboxAction(with actionModel: ActionModelProtocol, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable: Any]?) { - MVMCoreUIActionHandler.performActionUnstructured(with: actionModel, sourceModel: checkboxModel, additionalData: additionalData, delegateObject: delegateObject) + MVMCoreUIActionHandler.performActionUnstructured(with: actionModel, sourceModel: viewModel, additionalData: additionalData, delegateObject: delegateObject) } diff --git a/MVMCoreUI/Atomic/Atoms/Views/CheckboxLabel.swift b/MVMCoreUI/Atomic/Atoms/Views/CheckboxLabel.swift index d4c25889..b1454a97 100644 --- a/MVMCoreUI/Atomic/Atoms/Views/CheckboxLabel.swift +++ b/MVMCoreUI/Atomic/Atoms/Views/CheckboxLabel.swift @@ -50,9 +50,9 @@ import VDS } //secondary label - if let subtitleModel = viewModel.subtitle { - childText = subtitleModel.text - if let attributes = subtitleModel.attributes?.toVDSLabelAttributeModel(delegateObject: delegateObject, additionalData: additionalData) { + if let subTitleModel = viewModel.subTitle { + childText = subTitleModel.text + if let attributes = subTitleModel.attributes?.toVDSLabelAttributeModel(delegateObject: delegateObject, additionalData: additionalData) { childTextAttributes = attributes } } diff --git a/MVMCoreUI/Atomic/Atoms/Views/CheckboxLabelModel.swift b/MVMCoreUI/Atomic/Atoms/Views/CheckboxLabelModel.swift index ea78a174..faa13e60 100644 --- a/MVMCoreUI/Atomic/Atoms/Views/CheckboxLabelModel.swift +++ b/MVMCoreUI/Atomic/Atoms/Views/CheckboxLabelModel.swift @@ -10,12 +10,6 @@ import Foundation import MVMCore import VDS -public enum CheckboxPosition: String, Codable { - case center - case top - case bottom -} - @objcMembers open class CheckboxLabelModel: MoleculeModelProtocol, ParentMoleculeModelProtocol { open class var identifier: String { "checkboxLabel" } public var moleculeName: String = CheckboxLabelModel.identifier @@ -24,23 +18,23 @@ public enum CheckboxPosition: String, Codable { public var backgroundColor: Color? public var checkbox: CheckboxModel public var label: LabelModel - public var subtitle: LabelModel? + public var subTitle: LabelModel? public var inverted: Bool? = false public var surface: Surface { inverted ?? false ? .dark : .light } public var children: [MoleculeModelProtocol] { - guard let subtitle else { return [checkbox, label] } - return [checkbox, label, subtitle] + guard let subTitle else { return [checkbox, label] } + return [checkbox, label, subTitle] } //-------------------------------------------------- // MARK: - Initializer //-------------------------------------------------- - public init(checkbox: CheckboxModel, label: LabelModel, subtitle: LabelModel?) { + public init(checkbox: CheckboxModel, label: LabelModel, subTitle: LabelModel?) { self.checkbox = checkbox self.label = label - self.subtitle = subtitle + self.subTitle = subTitle } }