Closed movsianikov closed 1 month ago
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
View this failed invocation of the CLA check for more information.
For the most up to date status, view the checks section at the bottom of the pull request.
Can you clarify what you mean by "allows to customize the button using constructor, otherwise - the customization doesn't work?" I am not sure what you're fixing.
Can you clarify what you mean by "allows to customize the button using constructor, otherwise - the customization doesn't work?" I am not sure what you're fixing.
Hi @mdmathias , of course! Here you go:
@ObservedObject private var vm = GoogleSignInButtonViewModel(scheme: .dark, style: .wide, state: .normal)
init() {
vm.style = .wide
vm.scheme = .dark
}
@ObservedObject private var vm = GoogleSignInButtonViewModel(scheme: .dark, style: .wide, state: .normal)
Please let me know if you have any questions, comments, or concerns.
Thank you!
Best regards, MAKSYM OVSIANIKOV
@movsianikov I'm sorry! I still don't understand what you mean by the "customization" not working. In SignInView.swift
, if you create the vm
with a different scheme (e.g., .dark
), then the button will be drawn with the dark blue background.
struct SignInView: View {
@EnvironmentObject var authViewModel: AuthenticationViewModel
@ObservedObject var vm = GoogleSignInButtonViewModel(scheme: .dark)
...
I am closing this pull request due to inactivity.
Fix issue with declaration of GoogleSignInButtonViewModel variable. Switching to @StateObject from @ObservedObject allows to customize the button using constructor, otherwise - the customization doesn't work.