add title

This commit is contained in:
Suhail Saqan
2022-12-22 05:00:01 -06:00
parent 3a34fd5f46
commit 2f33a7f761

View File

@@ -23,6 +23,7 @@ struct SelectWalletView: View {
let walletItems = try! JSONDecoder().decode([WalletItem].self, from: Constants.WALLETS) let walletItems = try! JSONDecoder().decode([WalletItem].self, from: Constants.WALLETS)
var body: some View { var body: some View {
NavigationView {
VStack(alignment: .leading) { VStack(alignment: .leading) {
ForEach(walletItems) { wallet in ForEach(walletItems) { wallet in
HStack(spacing: 20) { HStack(spacing: 20) {
@@ -31,7 +32,8 @@ struct SelectWalletView: View {
.scaledToFit() .scaledToFit()
.aspectRatio(contentMode: .fit) .aspectRatio(contentMode: .fit)
.cornerRadius(5) .cornerRadius(5)
Button("\(wallet.name)"){ Text("\(wallet.name)")
}.onTapGesture {
if let url = URL(string: "\(wallet.link)\(invoice)"), UIApplication.shared.canOpenURL(url) { if let url = URL(string: "\(wallet.link)\(invoice)"), UIApplication.shared.canOpenURL(url) {
openURL(url) openURL(url)
} else { } else {
@@ -39,11 +41,18 @@ struct SelectWalletView: View {
openURL(url) openURL(url)
} }
} }
}.buttonStyle(.borderedProminent) }
.contentShape(Rectangle()) Divider()
} }
} }
.navigationBarTitle(Text("Select Wallet"), displayMode: .inline)
.navigationBarItems(trailing: Button(action: {
self.show_select_wallet = false
}) {
Text("Done").bold()
})
} }
} }
} }