-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from SwiftfulThinking/SwiftfulThinking-patch-1
Swiftful thinking patch 1
- Loading branch information
Showing
7 changed files
with
282 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
Sources/SwiftfulFirebaseAuth/Core/ASAuthorizationAppleIDButton+EXT.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
// | ||
// ASAuthorizationAppleIDButton.swift | ||
// | ||
// | ||
// Created by Nick Sarno on 4/22/24. | ||
// | ||
|
||
import Foundation | ||
import SwiftUI | ||
import AuthenticationServices | ||
|
||
extension ASAuthorizationAppleIDButton.Style { | ||
var backgroundColor: Color { | ||
switch self { | ||
case .white: | ||
return .white | ||
case .whiteOutline: | ||
return .white | ||
default: | ||
return .black | ||
} | ||
} | ||
|
||
var foregroundColor: Color { | ||
switch self { | ||
case .white: | ||
return .black | ||
case .whiteOutline: | ||
return .black | ||
default: | ||
return .white | ||
} | ||
} | ||
|
||
var borderColor: Color { | ||
switch self { | ||
case .white: | ||
return .white | ||
case .whiteOutline: | ||
return .black | ||
default: | ||
return .black | ||
} | ||
} | ||
} | ||
|
||
extension ASAuthorizationAppleIDButton.ButtonType { | ||
var buttonText: String { | ||
switch self { | ||
case .signIn: | ||
return "Sign in with" | ||
case .continue: | ||
return "Continue with" | ||
case .signUp: | ||
return "Sign up with" | ||
default: | ||
return "Sign in with" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.