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 {
|
public enum Layout: String, CaseIterable {
|
||||||
case bottom, right
|
case vertical, horizontal
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -138,12 +138,12 @@ public class Notification: View {
|
|||||||
|
|
||||||
open var type: NotificationStyle = .info { didSet{didChange()}}
|
open var type: NotificationStyle = .info { didSet{didChange()}}
|
||||||
|
|
||||||
var _layout: ButtonsLayout = .bottom
|
var _layout: Layout = .vertical
|
||||||
open var layout: ButtonsLayout {
|
open var layout: Layout {
|
||||||
set {
|
set {
|
||||||
if !UIDevice.isIPad, newValue == .right { return }
|
if !UIDevice.isIPad, newValue == .horizontal { return }
|
||||||
_layout = newValue
|
_layout = newValue
|
||||||
buttonsView.buttonPosition = _layout == .right ? .center : .left
|
buttonsView.buttonPosition = _layout == .horizontal ? .center : .left
|
||||||
didChange()
|
didChange()
|
||||||
}
|
}
|
||||||
get { _layout }
|
get { _layout }
|
||||||
@ -218,7 +218,7 @@ public class Notification: View {
|
|||||||
type = .info
|
type = .info
|
||||||
typeIcon.name = .infoBold
|
typeIcon.name = .infoBold
|
||||||
closeButton.name = .close
|
closeButton.name = .close
|
||||||
layout = .bottom
|
layout = .vertical
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -281,7 +281,7 @@ public class Notification: View {
|
|||||||
labelsView.setCustomSpacing(VDSLayout.Spacing.space3X.value, after: subTitleLabel)
|
labelsView.setCustomSpacing(VDSLayout.Spacing.space3X.value, after: subTitleLabel)
|
||||||
|
|
||||||
buttonsView.buttons = buttons
|
buttonsView.buttons = buttons
|
||||||
labelButtonView.axis = layout == .bottom ? .vertical : .horizontal
|
labelButtonView.axis = layout == .vertical ? .vertical : .horizontal
|
||||||
labelButtonView.addArrangedSubview(buttonsView)
|
labelButtonView.addArrangedSubview(buttonsView)
|
||||||
|
|
||||||
buttonsView
|
buttonsView
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user