Skip to content

Commit 0ef309e

Browse files
committed
Remove trailing whitespaces.
1 parent f1c13d3 commit 0ef309e

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

WooCommerce/Classes/POS/Presentation/Reusable Views/Buttons/POSButtonStyle.swift

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@ enum POSButtonSize {
1616
struct POSButtonStyle: ButtonStyle {
1717
@Environment(\.colorScheme) var colorScheme
1818
@Environment(\.isEnabled) var isEnabled
19-
19+
2020
let variant: POSButtonVariant
2121
let size: POSButtonSize
22-
22+
2323
init(variant: POSButtonVariant = .filled,
2424
size: POSButtonSize = .normal) {
2525
self.variant = variant
2626
self.size = size
2727
}
28-
28+
2929
func makeBody(configuration: Configuration) -> some View {
3030
Group {
3131
switch size {
@@ -51,7 +51,7 @@ struct POSButtonStyle: ButtonStyle {
5151
.opacity(configuration.isPressed ? 0.7 : 1.0)
5252
.animation(.easeOut(duration: 0.15), value: configuration.isPressed)
5353
}
54-
54+
5555
private var backgroundColor: Color {
5656
switch (variant, isEnabled) {
5757
case (.filled, true):
@@ -62,7 +62,7 @@ struct POSButtonStyle: ButtonStyle {
6262
.clear
6363
}
6464
}
65-
65+
6666
private var foregroundColor: Color {
6767
switch (variant, isEnabled) {
6868
case (.filled, true):
@@ -75,7 +75,7 @@ struct POSButtonStyle: ButtonStyle {
7575
.posOnDisabledContainer
7676
}
7777
}
78-
78+
7979
@ViewBuilder
8080
private var borderOverlay: some View {
8181
if variant == .outlined {
@@ -97,7 +97,7 @@ private extension POSButtonSize {
9797
(vertical: 8, horizontal: 16)
9898
}
9999
}
100-
100+
101101
var font: POSFontStyle {
102102
switch self {
103103
case .normal:
@@ -118,40 +118,40 @@ struct POSButtonStyle_Previews: View {
118118
VStack(alignment: .leading, spacing: 32) {
119119
previewSection(title: "Filled Buttons - Normal",
120120
variant: .filled, size: .normal)
121-
121+
122122
previewSection(title: "Filled Buttons - Extra Small",
123123
variant: .filled, size: .extraSmall)
124-
124+
125125
previewSection(title: "Outlined Buttons - Normal",
126126
variant: .outlined, size: .normal)
127-
127+
128128
previewSection(title: "Outlined Buttons - Extra Small",
129129
variant: .outlined, size: .extraSmall)
130-
130+
131131
// Example with long text
132132
VStack(alignment: .leading, spacing: 16) {
133133
Text("Long Text Examples")
134134
.font(.headline)
135-
135+
136136
Button("This is a very long button text that might wrap to multiple lines") {}
137137
.buttonStyle(POSButtonStyle(variant: .filled, size: .normal))
138-
138+
139139
Button("Long text in small size button that might need to wrap") {}
140140
.buttonStyle(POSButtonStyle(variant: .outlined, size: .extraSmall))
141141
}
142142
}
143143
.padding()
144144
}
145145
}
146-
146+
147147
private func previewSection(title: String, variant: POSButtonVariant, size: POSButtonSize) -> some View {
148148
VStack(alignment: .leading, spacing: 16) {
149149
Text(title)
150150
.font(.headline)
151-
151+
152152
Button("Enabled Button") {}
153153
.buttonStyle(POSButtonStyle(variant: variant, size: size))
154-
154+
155155
Button("Disabled Button") {}
156156
.buttonStyle(POSButtonStyle(variant: variant, size: size))
157157
.disabled(true)

0 commit comments

Comments
 (0)