mirror of
https://github.com/yattee/yattee.git
synced 2024-12-13 05:40:32 +05:30
24 lines
553 B
Swift
24 lines
553 B
Swift
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()
|
|
}
|
|
}
|