1313// limitations under the License.
1414
1515import FirebaseAuth
16+ import FirebaseCore
1617import SwiftUI
1718
1819extension MultiFactorInfo : Identifiable {
@@ -96,10 +97,16 @@ extension MFAManagementView: View {
9697 . multilineTextAlignment ( . center)
9798 . padding ( . horizontal)
9899
99- Button ( " Set Up Two-Factor Authentication " ) {
100+ Button {
100101 navigateToEnrollment ( )
102+ } label: {
103+ Text ( " Set Up Two-Factor Authentication " )
104+ . padding ( . vertical, 8 )
105+ . frame ( maxWidth: . infinity)
101106 }
102107 . buttonStyle ( . borderedProminent)
108+ . padding ( [ . top, . bottom] , 8 )
109+ . frame ( maxWidth: . infinity)
103110 . accessibilityIdentifier ( " setup-mfa-button " )
104111 }
105112 } else {
@@ -119,14 +126,17 @@ extension MFAManagementView: View {
119126 Button ( " Add Another Method " ) {
120127 navigateToEnrollment ( )
121128 }
122- . buttonStyle ( . bordered)
123- . padding ( . horizontal)
129+ . padding ( [ . top, . bottom] , 8 )
130+ . frame ( maxWidth: . infinity)
131+ . buttonStyle ( . borderedProminent)
124132 . accessibilityIdentifier ( " add-mfa-method-button " )
125133 }
126134 }
127135
128136 Spacer ( )
129137 }
138+ . frame ( maxWidth: . infinity, maxHeight: . infinity, alignment: . top)
139+ . safeAreaPadding ( )
130140 . onAppear {
131141 loadEnrolledFactors ( )
132142 }
@@ -199,6 +209,9 @@ private extension DateFormatter {
199209}
200210
201211#Preview {
202- MFAManagementView ( )
203- . environment ( AuthService ( ) )
212+ FirebaseOptions . dummyConfigurationForPreview ( )
213+ return NavigationStack {
214+ MFAManagementView ( )
215+ . environment ( AuthService ( ) )
216+ }
204217}
0 commit comments