Files
QuickDrop/ShareExtension/QrCodeView.swift
T

66 lines
1.6 KiB
Swift

//
// QrCodeVIew.swift
// QuickDrop
//
// Created by Leon Böttger on 10.03.25.
//
import SwiftUI
let qrCodeViewSize = CGSize(width: 530.0, height: 270.0)
struct QrCodeView: View {
@State private var qrCode: String = ""
let closeView: () -> Void
var body: some View {
VStack {
Button(action: {
closeView()
}, label: {
Image(systemName: "xmark")
.font(.system(size: 20))
.foregroundColor(.gray)
})
.buttonStyle(PlainButtonStyle())
.frame(maxWidth: .infinity, alignment: .trailing)
.padding(.trailing, 15)
.padding(.top, 15)
HStack {
Spacer()
Image("QR")
.resizable()
.aspectRatio(1, contentMode: .fit)
.frame(height: 190)
Spacer()
Text("QrCodeInstructions".localized())
.padding(.top, 5)
.padding(.horizontal)
.fixedSize(horizontal: false, vertical: true)
.multilineTextAlignment(.center)
Spacer()
}
.padding(.horizontal)
.padding(.bottom)
Spacer()
}
.frame(width: qrCodeViewSize.width, height: qrCodeViewSize.height)
}
}
#Preview {
QrCodeView(closeView: {})
}