From fee33a17da3a6984b1c95785c9abbe6cfbeaa044 Mon Sep 17 00:00:00 2001 From: Sumanth Nadigadda Date: Thu, 30 Mar 2023 23:13:32 +0530 Subject: [PATCH] Renaming parameters in Notification component --- VDS/Components/Notification/Notification.swift | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/VDS/Components/Notification/Notification.swift b/VDS/Components/Notification/Notification.swift index f0a4d58b..2a701d34 100644 --- a/VDS/Components/Notification/Notification.swift +++ b/VDS/Components/Notification/Notification.swift @@ -35,7 +35,7 @@ public class Notification: View { } } - public enum ButtonsPosition: String, CaseIterable { + public enum ButtonsLayout: String, CaseIterable { case bottom, right } @@ -138,15 +138,15 @@ public class Notification: View { open var type: NotificationStyle = .info { didSet{didChange()}} - var _buttonPosition: ButtonsPosition = .bottom - open var buttonPosition: ButtonsPosition { + var _layout: ButtonsLayout = .bottom + open var layout: ButtonsLayout { set { if !UIDevice.isIPad, newValue == .right { return } - _buttonPosition = newValue - buttonsView.buttonPosition = _buttonPosition == .right ? .center : .left + _layout = newValue + buttonsView.buttonPosition = _layout == .right ? .center : .left didChange() } - get { _buttonPosition } + get { _layout } } //-------------------------------------------------- @@ -218,7 +218,7 @@ public class Notification: View { type = .info typeIcon.name = .infoBold closeButton.name = .close - buttonPosition = .bottom + layout = .bottom } //-------------------------------------------------- @@ -281,7 +281,7 @@ public class Notification: View { labelsView.setCustomSpacing(VDSLayout.Spacing.space3X.value, after: subTitleLabel) buttonsView.buttons = buttons - labelButtonView.axis = buttonPosition == .bottom ? .vertical : .horizontal + labelButtonView.axis = layout == .bottom ? .vertical : .horizontal labelButtonView.addArrangedSubview(buttonsView) buttonsView