Implement bank transfer app flows

This commit is contained in:
2026-06-08 00:03:57 +05:00
parent ef877217ad
commit 9b281d48a7
127 changed files with 8008 additions and 90 deletions
@@ -0,0 +1,58 @@
import SwiftUI
struct NumpadView: View {
let onKey: (String) -> Void
private let rows: [[String]] = [
["1", "2", "3"],
["4", "5", "6"],
["7", "8", "9"],
["", "0", ""]
]
var body: some View {
VStack(spacing: 12) {
ForEach(rows, id: \.self) { row in
HStack(spacing: 20) {
ForEach(row, id: \.self) { key in
NumpadKey(label: key) { onKey(key) }
}
}
}
}
}
}
private struct NumpadKey: View {
let label: String
let action: () -> Void
var isConfirm: Bool { label == "" }
var body: some View {
Button(action: action) {
Group {
switch label {
case "":
Image(systemName: "delete.left")
.font(.system(size: 22))
case "":
Image(systemName: "checkmark")
.font(.system(size: 22, weight: .semibold))
default:
Text(label)
.font(.system(size: 28, weight: .light))
}
}
.frame(width: 72, height: 72)
.background(isConfirm ? Color.accentColor : Color(.systemFill))
.foregroundStyle(isConfirm ? .white : .primary)
.clipShape(Circle())
}
.buttonStyle(.plain)
}
}
#Preview {
NumpadView { _ in }
}