refactored properties
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
60dd7a103e
commit
7d14ab1f5c
@ -101,9 +101,9 @@ public class Notification: View {
|
||||
}
|
||||
|
||||
//Text
|
||||
open var titleText: String = "" { didSet{didChange()}}
|
||||
open var title: String = "" { didSet{didChange()}}
|
||||
|
||||
open var subTitleText: String? { didSet{didChange()}}
|
||||
open var subTitle: String? { didSet{didChange()}}
|
||||
|
||||
//Buttons
|
||||
open var primaryButtonModel: ButtonModel? { didSet{didChange()}}
|
||||
@ -195,6 +195,8 @@ public class Notification: View {
|
||||
mainStackView.heightAnchor.constraint(greaterThanOrEqualToConstant: minContentHeight)
|
||||
])
|
||||
|
||||
labelButtonView.addArrangedSubview(labelsView)
|
||||
|
||||
mainStackView.addArrangedSubview(typeIcon)
|
||||
mainStackView.addArrangedSubview(labelButtonView)
|
||||
mainStackView.addArrangedSubview(closeButton)
|
||||
@ -240,15 +242,15 @@ public class Notification: View {
|
||||
titleLabel.surface = surface
|
||||
subTitleLabel.surface = surface
|
||||
|
||||
if !titleText.isEmpty {
|
||||
titleLabel.text = titleText
|
||||
if !title.isEmpty {
|
||||
titleLabel.text = title
|
||||
labelsView.addArrangedSubview(titleLabel)
|
||||
} else {
|
||||
titleLabel.removeFromSuperview()
|
||||
}
|
||||
|
||||
if let subTitleText {
|
||||
subTitleLabel.text = subTitleText
|
||||
if let subTitle {
|
||||
subTitleLabel.text = subTitle
|
||||
labelsView.addArrangedSubview(subTitleLabel)
|
||||
} else {
|
||||
subTitleLabel.removeFromSuperview()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user