You would've thought this is basic stuff, I have a view with CancelButtonView with the following code:
import SwiftUI
struct CancelButtonView: View {
var body: some View {
NavigationView {
NavigationLink(destination: AboutView()) {
Button {
} label: {
HStack {
Spacer()
Text("Continue anyway")
.foregroundColor(.white)
.padding(.vertical, 10)
.font(.system(size: 14, weight: .semibold))
Spacer()
}.background(Color.blue)
}
}
}
}
}
struct CancelButtonView_Previews: PreviewProvider {
static var previews: some View {
CancelButtonView()
}
}
in my other view I am calling this:
CancelButtonView()
Why can't I see my button?!