Files
OSGKeyboard/OSGKeyboardShared/DesignSystem/UsageSurfaceCard.swift
T
Rocky 39002336c0
CI / Validate manifests (push) Has been cancelled
CI / SwiftLint (push) Has been cancelled
CI / iOS / Extension (push) Has been cancelled
CI / macOS (push) Has been cancelled
feat(app): add flow diagnostics and refine interface
Improve failure recovery visibility, strengthen account-session handling, and make the cross-platform interface more consistent.
2026-08-26 14:40:06 +08:00

36 lines
1005 B
Swift

// UsageSurfaceCard.swift
// OSGKeyboard · Shared
//
// Semantic surface used by home / dashboard stats on every platform.
// Shared card elevation keeps its depth consistent with the rest of the app.
import SwiftUI
public struct UsageSurfaceCard<Content: View>: View {
@Environment(\.themePalette) private var palette
public var padding: CGFloat
public var cornerRadius: CGFloat
@ViewBuilder public var content: () -> Content
public init(
padding: CGFloat = Spacing.md,
cornerRadius: CGFloat = Radius.xl,
@ViewBuilder content: @escaping () -> Content
) {
self.padding = padding
self.cornerRadius = cornerRadius
self.content = content
}
public var body: some View {
let shape = RoundedRectangle(cornerRadius: cornerRadius, style: .continuous)
content()
.padding(padding)
.background(palette.surface, in: shape)
.clipShape(shape)
.cardElevation()
}
}