-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathFundManualSuccessView.swift
More file actions
61 lines (51 loc) · 1.9 KB
/
FundManualSuccessView.swift
File metadata and controls
61 lines (51 loc) · 1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import SwiftUI
struct FundManualSuccessView: View {
@EnvironmentObject var app: AppViewModel
@EnvironmentObject var navigation: NavigationViewModel
/// Keep in state so we don't get a new random text on each render
@State private var randomOkText: String = localizedRandom("common__ok_random")
var body: some View {
VStack(spacing: 0) {
NavigationBar(title: t("lightning__external_success__nav_title"), showBackButton: false)
.padding(.bottom, 16)
VStack(alignment: .leading, spacing: 16) {
DisplayText(
t("lightning__external_success__title"),
accentColor: .purpleAccent
)
.fixedSize(horizontal: false, vertical: true)
BodyMText(
t("lightning__external_success__text"),
textColor: .textSecondary, accentColor: .white, accentFont: Fonts.bold
)
Spacer()
Image("lightning")
.resizable()
.aspectRatio(contentMode: .fit)
.frame(width: 256, height: 256)
.padding()
.frame(maxWidth: .infinity, maxHeight: .infinity)
Spacer()
CustomButton(
title: randomOkText,
size: .large
) {
navigation.reset()
}
.accessibilityIdentifier("ExternalSuccess-button")
}
.accessibilityElement(children: .contain)
.accessibilityIdentifier("ExternalSuccess")
}
.navigationBarHidden(true)
.allowSwipeBack(false)
.padding(.horizontal, 16)
}
}
#Preview {
NavigationStack {
FundManualSuccessView()
.environmentObject(AppViewModel())
}
.preferredColorScheme(.dark)
}