@@ -10,10 +10,10 @@ extension UIButton {
1010 func applyPrimaryButtonStyle( ) {
1111 var configuration = UIButton . Configuration. filled ( )
1212 configuration. contentInsets = . init(
13- top: Style . defaultVerticalInsets ,
14- leading: Style . defaultHorizontalInsets ,
15- bottom: Style . defaultVerticalInsets ,
16- trailing: Style . defaultHorizontalInsets
13+ top: Style . verticalInset ,
14+ leading: Style . horizontalInset ,
15+ bottom: Style . verticalInset ,
16+ trailing: Style . horizontalInset
1717 )
1818 layer. borderColor = UIColor . primaryButtonBorder. cgColor
1919 layer. borderWidth = Style . defaultBorderWidth
@@ -47,10 +47,10 @@ extension UIButton {
4747 func applySecondaryButtonStyle( ) {
4848 var configuration = UIButton . Configuration. filled ( )
4949 configuration. contentInsets = . init(
50- top: Style . defaultVerticalInsets ,
51- leading: Style . defaultHorizontalInsets ,
52- bottom: Style . defaultVerticalInsets ,
53- trailing: Style . defaultHorizontalInsets
50+ top: Style . verticalInset ,
51+ leading: Style . horizontalInset ,
52+ bottom: Style . verticalInset ,
53+ trailing: Style . horizontalInset
5454 )
5555 backgroundColor = . secondaryButtonBackground
5656 layer. borderColor = UIColor . secondaryButtonBorder. cgColor
@@ -85,10 +85,10 @@ extension UIButton {
8585 func applyLinkButtonStyle( enableMultipleLines: Bool = false ) {
8686 var configuration = UIButton . Configuration. plain ( )
8787 configuration. contentInsets = . init(
88- top: Style . defaultVerticalInsets ,
89- leading: Style . defaultHorizontalInsets ,
90- bottom: Style . defaultVerticalInsets ,
91- trailing: Style . defaultHorizontalInsets
88+ top: Style . verticalInset ,
89+ leading: Style . horizontalInset ,
90+ bottom: Style . verticalInset ,
91+ trailing: Style . horizontalInset
9292 )
9393 backgroundColor = . clear
9494 tintColor = . accent
@@ -115,10 +115,10 @@ extension UIButton {
115115 func applyPaymentsModalCancelButtonStyle( ) {
116116 var configuration = UIButton . Configuration. plain ( )
117117 configuration. contentInsets = . init(
118- top: Style . defaultVerticalInsets ,
119- leading: Style . defaultHorizontalInsets ,
120- bottom: Style . defaultVerticalInsets ,
121- trailing: Style . defaultHorizontalInsets
118+ top: Style . verticalInset ,
119+ leading: Style . horizontalInset ,
120+ bottom: Style . verticalInset ,
121+ trailing: Style . horizontalInset
122122 )
123123 backgroundColor = . tertiarySystemBackground
124124 layer. borderColor = UIColor . secondaryButtonBorder. cgColor
@@ -193,7 +193,7 @@ private extension UIButton {
193193 struct Style {
194194 static let defaultCornerRadius = CGFloat ( 8.0 )
195195 static let defaultBorderWidth = CGFloat ( 1.0 )
196- static let defaultVerticalInsets = CGFloat ( 12 )
197- static let defaultHorizontalInsets = CGFloat ( 22 )
196+ static let verticalInset = CGFloat ( 12 )
197+ static let horizontalInset = CGFloat ( 22 )
198198 }
199199}
0 commit comments