using helper now
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
89e6ea43d0
commit
b23351386b
@ -28,12 +28,18 @@ import VDS
|
||||
title = viewModel.headline.text
|
||||
subTitle = viewModel.body?.text
|
||||
|
||||
if let buttonModel = viewModel.button {
|
||||
primaryButtonModel = buttonModel.toNotficationButtonModel(delegateObject: delegateObject, additionalData)
|
||||
if let button = viewModel.button {
|
||||
primaryButtonModel = .init(text: button.title, onClick: {[weak self] _ in
|
||||
guard let self else { return }
|
||||
self.executeAction(model: button, delegateObject: self.delegateObject, additionalData: self.additionalData)
|
||||
})
|
||||
}
|
||||
|
||||
if let buttonModel = viewModel.secondaryButton {
|
||||
secondaryButtonModel = buttonModel.toNotficationButtonModel(delegateObject: delegateObject, additionalData)
|
||||
if let secondaryButton = viewModel.secondaryButton {
|
||||
secondaryButtonModel = .init(text: secondaryButton.title, onClick: {[weak self] _ in
|
||||
guard let self else { return }
|
||||
self.executeAction(model: secondaryButton, delegateObject: self.delegateObject, additionalData: self.additionalData)
|
||||
})
|
||||
}
|
||||
|
||||
if let accessibilityIdentifier = viewModel.accessibilityIdentifier {
|
||||
@ -43,9 +49,9 @@ import VDS
|
||||
if let closeButton = viewModel.closeButton {
|
||||
onCloseClick = { [weak self] _ in
|
||||
guard let self else { return }
|
||||
closeButton.onClick(delegateObject: self.delegateObject, self.additionalData)
|
||||
}
|
||||
self.executeAction(model: closeButton, delegateObject: self.delegateObject, additionalData: self.additionalData) }
|
||||
}
|
||||
|
||||
hideCloseButton = viewModel.closeButton == nil
|
||||
style = viewModel.style.toVDSStyle
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user