From bb4cb2a0d3d72353324a6e5594cc0f28bdf37c22 Mon Sep 17 00:00:00 2001 From: Markus Thielker Date: Tue, 21 Jan 2025 16:06:14 +0100 Subject: [PATCH] PWD-1: revert button changes --- password/ui/components/PwdButton.swift | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/password/ui/components/PwdButton.swift b/password/ui/components/PwdButton.swift index f2ed6ab..b4ade36 100644 --- a/password/ui/components/PwdButton.swift +++ b/password/ui/components/PwdButton.swift @@ -17,19 +17,22 @@ struct PwdButton: View { var action: () -> Void var body: some View { - Button(action: action) { + HStack{ label } - .buttonStyle(PlainButtonStyle()) - .padding(size.padding) - .background(variant.backgroundColor(colorScheme)) - .foregroundColor(variant.foregroundColor(colorScheme)) - .font(size.font) - .cornerRadius(size.cornerRadius) - .overlay( - RoundedRectangle(cornerRadius: size.cornerRadius) - .stroke(variant.borderColor(colorScheme), lineWidth: variant.borderWidth) - ) + .buttonStyle(PlainButtonStyle()) + .padding(size.padding) + .background(variant.backgroundColor(colorScheme)) + .foregroundColor(variant.foregroundColor(colorScheme)) + .font(size.font) + .cornerRadius(size.cornerRadius) + .overlay( + RoundedRectangle(cornerRadius: size.cornerRadius) + .stroke(variant.borderColor(colorScheme), lineWidth: variant.borderWidth) + ) + .onTapGesture { + action() + } } }