Skip to content

Commit ad11185

Browse files
committed
Provide less spacing for buttons
1 parent 9debaed commit ad11185

File tree

1 file changed

+24
-16
lines changed

1 file changed

+24
-16
lines changed

WooCommerce/Classes/Authentication/Epilogue/StorePickerError.swift

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ final class StorePickerErrorHostingController: UIHostingController<StorePickerEr
1717
///
1818
struct StorePickerError: View {
1919
var body: some View {
20-
VStack(alignment: .center, spacing: 30) {
20+
VStack(alignment: .center, spacing: Layout.mainVerticalSpacing) {
2121
// Title
2222
Text(Localization.title)
2323
.headlineStyle()
@@ -29,27 +29,29 @@ struct StorePickerError: View {
2929
Text(Localization.body)
3030
.bodyStyle()
3131

32-
// Primary Button
33-
Button(Localization.troubleshoot) {
34-
print("Troubleshooting Tips tapped")
35-
}
36-
.buttonStyle(PrimaryButtonStyle())
32+
VStack(spacing: Layout.buttonsSpacing) {
33+
// Primary Button
34+
Button(Localization.troubleshoot) {
35+
print("Troubleshooting Tips tapped")
36+
}
37+
.buttonStyle(PrimaryButtonStyle())
3738

38-
// Secondary button
39-
Button(Localization.contact) {
40-
print("Contact support tapped")
41-
}
42-
.buttonStyle(SecondaryButtonStyle())
39+
// Secondary button
40+
Button(Localization.contact) {
41+
print("Contact support tapped")
42+
}
43+
.buttonStyle(SecondaryButtonStyle())
4344

44-
// Dismiss button
45-
Button(Localization.back) {
46-
print("Back to site")
45+
// Dismiss button
46+
Button(Localization.back) {
47+
print("Back to site")
48+
}
49+
.buttonStyle(LinkButtonStyle())
4750
}
48-
.buttonStyle(LinkButtonStyle())
4951
}
5052
.padding()
5153
.background(Color(.basicBackground))
52-
.cornerRadius(10)
54+
.cornerRadius(Layout.rounderCorners)
5355
}
5456
}
5557

@@ -67,6 +69,12 @@ private extension StorePickerError {
6769
static let back = NSLocalizedString("Back to Sites",
6870
comment: "Text for the button to dismiss the store picker error screen")
6971
}
72+
73+
enum Layout {
74+
static let rounderCorners: CGFloat = 10
75+
static let mainVerticalSpacing: CGFloat = 25
76+
static let buttonsSpacing: CGFloat = 15
77+
}
7078
}
7179

7280
// MARK: Previews

0 commit comments

Comments
 (0)