yattee/Shared/Views/RequestErrorButton.swift

24 lines
553 B
Swift
Raw Permalink Normal View History

2022-12-16 08:35:10 +00:00
import Siesta
import SwiftUI
struct RequestErrorButton: View {
var error: RequestError?
var body: some View {
if let error {
Button {
NavigationModel.shared.presentRequestErrorAlert(error)
} label: {
Label("Error", systemImage: "exclamationmark.circle.fill")
.foregroundColor(Color("AppRedColor"))
}
}
}
}
struct RequestErrorButton_Previews: PreviewProvider {
static var previews: some View {
RequestErrorButton()
}
}