Skip to content

Commit 9e827d1

Browse files
committed
Add POSOutlinedButtonStyle for outlined style before replacing all usage.
1 parent de7d76c commit 9e827d1

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,19 @@ struct POSFilledButtonStyle: ButtonStyle {
2727
}
2828
}
2929

30+
/// Outlined button style in POS.
31+
struct POSOutlinedButtonStyle: ButtonStyle {
32+
private let size: POSButtonSize
33+
34+
init(size: POSButtonSize) {
35+
self.size = size
36+
}
37+
38+
func makeBody(configuration: Configuration) -> some View {
39+
POSButton(configuration: configuration, variant: .outlined, size: size, isLoading: false)
40+
}
41+
}
42+
3043
/// Button style in POS that has variants for filled and outlined buttons and different sizes.
3144
struct POSButtonStyle: ButtonStyle {
3245
let variant: POSButtonVariant

0 commit comments

Comments
 (0)