diff --git a/TelnyxWebRTCDemo/Views/SipCredentialsView.swift b/TelnyxWebRTCDemo/Views/SipCredentialsView.swift index 6767be81..d6f855e6 100644 --- a/TelnyxWebRTCDemo/Views/SipCredentialsView.swift +++ b/TelnyxWebRTCDemo/Views/SipCredentialsView.swift @@ -10,6 +10,8 @@ struct SipCredentialsView: View { @State private var internalIsShowingCredentialsInput: Bool @State private var viewHeight: CGFloat = 0 + let kViewHeight: CGFloat = 300.0 + let onCredentialSelected: (SipCredential?) -> Void let onSignIn: (SipCredential?) -> Void @@ -59,7 +61,7 @@ struct SipCredentialsView: View { .offset(y: 0) .onAppear { withAnimation{ - viewHeight = 300 + viewHeight = kViewHeight } } .onDisappear { @@ -162,3 +164,16 @@ struct SipCredentialsView: View { } } } + +// MARK: - +struct SipCredentialsView_Previews: PreviewProvider { + @State static var isShowingCredentialsInput = true + + static var previews: some View { + SipCredentialsView( + isShowingCredentialsInput: $isShowingCredentialsInput, + onCredentialSelected: { _ in }, + onSignIn: { _ in } + ) + } +}