Skip to content

Commit 2518b16

Browse files
authored
fix(Button): Settting corner radius according to the theme (#84)
1 parent 9f21487 commit 2518b16

File tree

4 files changed

+30
-55
lines changed

4 files changed

+30
-55
lines changed

Package.resolved

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Sources/Authenticator/Views/Primitives/Button.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,13 +200,14 @@ private struct AuthenticatorButtonStyle: ButtonStyle {
200200
if useOverlay {
201201
content(for: configuration)
202202
.overlay(
203-
RoundedRectangle(cornerRadius: .infinity)
203+
RoundedRectangle(cornerRadius: cornerRadius)
204204
.stroke(borderColor,
205205
lineWidth: borderWidth)
206206
)
207207

208208
} else {
209209
content(for: configuration)
210+
.cornerRadius(cornerRadius)
210211
.border(borderColor, width: borderWidth)
211212
}
212213
}

Tests/AuthenticatorHostApp/AuthenticatorHostApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 17 additions & 52 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Tests/AuthenticatorHostApp/AuthenticatorHostApp/Mocks/MockAuthenticationService.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,15 @@ class MockAuthenticationService: AuthenticationService {
123123
throw AuthenticatorError.error(message: "Unable to resend confirmation code for attribute")
124124
}
125125

126+
func sendVerificationCode(forUserAttributeKey userAttributeKey: AuthUserAttributeKey, options: AuthSendUserAttributeVerificationCodeRequest.Options?) async throws -> AuthCodeDeliveryDetails {
127+
resendConfirmationCodeForAttributeCount += 1
128+
if let mockedResendConfirmationCodeForAttributeResult = mockedResendConfirmationCodeForAttributeResult {
129+
return mockedResendConfirmationCodeForAttributeResult
130+
}
131+
132+
throw AuthenticatorError.error(message: "Unable to send verification code for attribute")
133+
}
134+
126135
var confirmUserAttributeCount = 0
127136
var mockedConfirmUserAttributeError: AuthenticatorError?
128137
func confirm(userAttribute: AuthUserAttributeKey, confirmationCode: String, options: AuthConfirmUserAttributeRequest.Options?) async throws {

0 commit comments

Comments
 (0)