general: conform reminder pages

This commit is contained in:
Michael Freno
2026-01-08 16:43:34 -05:00
parent 0e43a70a66
commit 4b3a1f99c9
4 changed files with 179 additions and 84 deletions

View File

@@ -0,0 +1,43 @@
//
// InfoBox.swift
// Gaze
//
// Created by Mike Freno on 1/8/26.
//
import SwiftUI
struct InfoBox: View {
let text: String
let url: String?
var body: some View {
HStack(spacing: 12) {
if let url = url, let urlObj = URL(string: url) {
Button(action: {
#if os(iOS)
UIApplication.shared.open(urlObj)
#elseif os(macOS)
NSWorkspace.shared.open(urlObj)
#endif
}) {
Image(systemName: "info.circle")
.foregroundColor(.white)
}.buttonStyle(.plain)
} else {
Image(systemName: "info.circle")
.foregroundColor(.white)
}
Text(text)
.font(.headline)
.foregroundColor(.white)
}
.padding()
.glassEffect(.regular.tint(.blue), in: .rect(cornerRadius: 8))
}
}
#Preview {
InfoBox(text: "This is an informational message that provides helpful context to the user.", url: "https://www.healthline.com/health/eye-health/20-20-20-rule")
.padding()
}