updated names
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
fee33a17da
commit
c8c63d5cd4
@ -35,8 +35,8 @@ public class Notification: View {
|
||||
}
|
||||
}
|
||||
|
||||
public enum ButtonsLayout: String, CaseIterable {
|
||||
case bottom, right
|
||||
public enum Layout: String, CaseIterable {
|
||||
case vertical, horizontal
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
@ -138,12 +138,12 @@ public class Notification: View {
|
||||
|
||||
open var type: NotificationStyle = .info { didSet{didChange()}}
|
||||
|
||||
var _layout: ButtonsLayout = .bottom
|
||||
open var layout: ButtonsLayout {
|
||||
var _layout: Layout = .vertical
|
||||
open var layout: Layout {
|
||||
set {
|
||||
if !UIDevice.isIPad, newValue == .right { return }
|
||||
if !UIDevice.isIPad, newValue == .horizontal { return }
|
||||
_layout = newValue
|
||||
buttonsView.buttonPosition = _layout == .right ? .center : .left
|
||||
buttonsView.buttonPosition = _layout == .horizontal ? .center : .left
|
||||
didChange()
|
||||
}
|
||||
get { _layout }
|
||||
@ -218,7 +218,7 @@ public class Notification: View {
|
||||
type = .info
|
||||
typeIcon.name = .infoBold
|
||||
closeButton.name = .close
|
||||
layout = .bottom
|
||||
layout = .vertical
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
@ -281,7 +281,7 @@ public class Notification: View {
|
||||
labelsView.setCustomSpacing(VDSLayout.Spacing.space3X.value, after: subTitleLabel)
|
||||
|
||||
buttonsView.buttons = buttons
|
||||
labelButtonView.axis = layout == .bottom ? .vertical : .horizontal
|
||||
labelButtonView.axis = layout == .vertical ? .vertical : .horizontal
|
||||
labelButtonView.addArrangedSubview(buttonsView)
|
||||
|
||||
buttonsView
|
||||
|
||||
Loading…
Reference in New Issue
Block a user