diff --git a/VDS/Components/Notification/Notification.swift b/VDS/Components/Notification/Notification.swift index 2a701d34..47785d6b 100644 --- a/VDS/Components/Notification/Notification.swift +++ b/VDS/Components/Notification/Notification.swift @@ -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