diff --git a/MVMCoreUI/Atomic/Molecules/TopNotification/CollapsableNotification.swift b/MVMCoreUI/Atomic/Molecules/TopNotification/CollapsableNotification.swift index 4c677029..612f3873 100644 --- a/MVMCoreUI/Atomic/Molecules/TopNotification/CollapsableNotification.swift +++ b/MVMCoreUI/Atomic/Molecules/TopNotification/CollapsableNotification.swift @@ -10,6 +10,7 @@ import Foundation import Combine import Dispatch import MVMCore +import VDSColorTokens @objcMembers open class CollapsableNotification: View { //-------------------------------------------------- @@ -50,7 +51,7 @@ import MVMCore open override func reset() { super.reset() verticalStack.reset() - backgroundColor = .mvmGreen() + backgroundColor = bottomView.backgroundColor } open func subscribeForNotifications() { @@ -110,6 +111,7 @@ import MVMCore } } initialState() + backgroundColor = bottomView.backgroundColor } open func performBlockOperation(with block: @escaping (MVMCoreBlockOperation) -> Void) { @@ -214,7 +216,7 @@ import MVMCore extension CollapsableNotification: StatusBarUI { public func getStatusBarUI() -> (color: UIColor, style: UIStatusBarStyle) { - let color = backgroundColor ?? UIColor.mvmGreen + let color = backgroundColor ?? VDSColor.feedbackInformationBackgroundOnlight var greyScale: CGFloat = 0 topView.label.textColor.getWhite(&greyScale, alpha: nil) return (color, greyScale > 0.5 ? .lightContent : .default) @@ -226,7 +228,7 @@ extension CollapsableNotification: AccessibilityProtocol { if !topView.isHidden { return topView } else { - return bottomView.headline + return bottomView.titleLabel } } } diff --git a/MVMCoreUI/Atomic/Molecules/TopNotification/CollapsableNotificationModel.swift b/MVMCoreUI/Atomic/Molecules/TopNotification/CollapsableNotificationModel.swift index 3d366347..480665e2 100644 --- a/MVMCoreUI/Atomic/Molecules/TopNotification/CollapsableNotificationModel.swift +++ b/MVMCoreUI/Atomic/Molecules/TopNotification/CollapsableNotificationModel.swift @@ -19,7 +19,7 @@ open class CollapsableNotificationModel: NotificationMoleculeModel { public var collapseTime: Int = 5 public var initiallyCollapsed = false - public init(with topLabel: LabelModel, headline: LabelModel, style: NotificationMoleculeModel.Style = .success, backgroundColor: Color? = nil, topAction: ActionModelProtocol? = nil, collapseTime: Int? = nil, body: LabelModel? = nil, button: ButtonModel? = nil, closeButton: NotificationXButtonModel? = nil) { + public init(with topLabel: LabelModel, headline: LabelModel, style: NotificationMoleculeModel.Style = .success, backgroundColor: Color? = nil, topAction: ActionModelProtocol? = nil, collapseTime: Int? = nil, body: LabelModel? = nil, button: ButtonModel? = nil, closeButton: ButtonModel? = nil) { self.topLabel = topLabel self.topAction = topAction if let collapseTime = collapseTime {