Browse Source

add title

post-button-style
Suhail Saqan 2 years ago
parent
commit
2f33a7f761
No known key found for this signature in database GPG Key ID: C3E8D33BFD16C6E6
  1. 33
      damus/Views/SelectWalletView.swift

33
damus/Views/SelectWalletView.swift

@ -23,15 +23,17 @@ 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 {
VStack(alignment: .leading) { NavigationView {
ForEach(walletItems) { wallet in VStack(alignment: .leading) {
HStack(spacing: 20) { ForEach(walletItems) { wallet in
Image(wallet.image) HStack(spacing: 20) {
.resizable() Image(wallet.image)
.scaledToFit() .resizable()
.aspectRatio(contentMode: .fit) .scaledToFit()
.cornerRadius(5) .aspectRatio(contentMode: .fit)
Button("\(wallet.name)"){ .cornerRadius(5)
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()
})
} }
} }
} }

Loading…
Cancel
Save