From fcf864a15b70e4ecb5bd789b1db3116221c34394 Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Sat, 11 Apr 2026 11:48:40 -0500 Subject: add FUNDING.yml --- Rune/Views/Shared/FeedbackViews.swift | 38 +++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 Rune/Views/Shared/FeedbackViews.swift (limited to 'Rune/Views/Shared') 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) + } +} -- cgit v1.2.3