diff --git a/MVMCoreUI/Atomic/Molecules/TopNotification/NotificationModel.swift b/MVMCoreUI/Atomic/Molecules/TopNotification/NotificationModel.swift new file mode 100644 index 00000000..ac74abb6 --- /dev/null +++ b/MVMCoreUI/Atomic/Molecules/TopNotification/NotificationModel.swift @@ -0,0 +1,23 @@ +// +// NotificationModel.swift +// MVMCoreUI +// +// Created by Scott Pfeil on 9/15/20. +// Copyright © 2020 Verizon Wireless. All rights reserved. +// + +import Foundation + +public class NotificationModel: MoleculeModelProtocol { + public static var identifier: String = "notification" + public var moleculeName: String = NotificationModel.identifier + public var backgroundColor: Color? + public var headline: LabelModel + public var body: LabelModel? + public var button: ButtonModel? + public var closeButton: NotificationXButtonModel? + + init(with headline: LabelModel) { + self.headline = headline + } +} diff --git a/MVMCoreUI/TopAlert/MVMCoreUITopAlertView+Extension.swift b/MVMCoreUI/TopAlert/MVMCoreUITopAlertView+Extension.swift index 99573688..d14d100f 100644 --- a/MVMCoreUI/TopAlert/MVMCoreUITopAlertView+Extension.swift +++ b/MVMCoreUI/TopAlert/MVMCoreUITopAlertView+Extension.swift @@ -37,6 +37,8 @@ public extension MVMCoreUITopAlertView { model.pages = nil//["settingsLanding"] jssoonnn?.updateValue(model.toJSON()!, forKey: "TopNotification")*/ guard let json = jssoonnn?.optionalDictionaryForKey("TopNotification") else { return } + print("TYTYT top alert new json \(json)") + // TODO: Top alert view is current delegate. Should move to current view controller eventually? let delegateObject = MVMCoreUIDelegateObject.create(withDelegateForAll: self) showTopAlert(with: json, delegateObject: delegateObject)