summaryrefslogtreecommitdiff
path: root/Rune/Views/Shared
diff options
context:
space:
mode:
authorChristian Cleberg <[email protected]>2026-04-11 11:48:40 -0500
committerChristian Cleberg <[email protected]>2026-04-11 11:48:40 -0500
commitfcf864a15b70e4ecb5bd789b1db3116221c34394 (patch)
treef15315324b9f95286b6bf7392dd0ccaee210c2de /Rune/Views/Shared
parentcf587aa0573ac4f34e1effe70108a9eca82093ac (diff)
downloadrune-fcf864a15b70e4ecb5bd789b1db3116221c34394.tar.gz
rune-fcf864a15b70e4ecb5bd789b1db3116221c34394.tar.bz2
rune-fcf864a15b70e4ecb5bd789b1db3116221c34394.zip
add FUNDING.yml
Diffstat (limited to 'Rune/Views/Shared')
-rw-r--r--Rune/Views/Shared/FeedbackViews.swift38
1 files changed, 38 insertions, 0 deletions
diff --git a/Rune/Views/Shared/FeedbackViews.swift b/Rune/Views/Shared/FeedbackViews.swift
new file mode 100644
index 0000000..9267ce2
--- /dev/null
+++ b/Rune/Views/Shared/FeedbackViews.swift
@@ -0,0 +1,38 @@
+import SwiftUI
+
+struct InlineErrorView: View {
+ let message: String
+ let retryTitle: String
+ let retryAction: () -> Void
+
+ var body: some View {
+ VStack(alignment: .leading, spacing: 8) {
+ Text(message)
+ .font(.subheadline)
+ .foregroundStyle(.red)
+
+ Button(retryTitle, action: retryAction)
+ .font(.subheadline.weight(.semibold))
+ }
+ .frame(maxWidth: .infinity, alignment: .leading)
+ .padding()
+ .background(Color.red.opacity(0.08), in: RoundedRectangle(cornerRadius: 12, style: .continuous))
+ }
+}
+
+struct FeedbackBanner: View {
+ let message: String
+ let tint: Color
+
+ var body: some View {
+ Text(message)
+ .font(.subheadline.weight(.semibold))
+ .foregroundStyle(tint)
+ .frame(maxWidth: .infinity, alignment: .leading)
+ .padding(.horizontal, 14)
+ .padding(.vertical, 10)
+ .background(tint.opacity(0.12), in: RoundedRectangle(cornerRadius: 12, style: .continuous))
+ .padding(.horizontal)
+ .padding(.top, 8)
+ }
+}