58 lines
1.5 KiB
Swift
58 lines
1.5 KiB
Swift
import SwiftUI
|
|
|
|
public struct AICard<Content: View>: View {
|
|
private let content: Content
|
|
|
|
public init(@ViewBuilder content: () -> Content) {
|
|
self.content = content()
|
|
}
|
|
|
|
public var body: some View {
|
|
content
|
|
.padding(16)
|
|
.background(AITheme.surface)
|
|
.clipShape(RoundedRectangle(cornerRadius: AITheme.cardRadius))
|
|
.overlay {
|
|
RoundedRectangle(cornerRadius: AITheme.cardRadius)
|
|
.strokeBorder(AITheme.line)
|
|
}
|
|
}
|
|
}
|
|
|
|
public struct AITag: View {
|
|
private let text: String
|
|
private let tint: Color
|
|
|
|
public init(_ text: String, tint: Color = AITheme.primary) {
|
|
self.text = text
|
|
self.tint = tint
|
|
}
|
|
|
|
public var body: some View {
|
|
Text(text)
|
|
.font(.system(size: 12, weight: .semibold))
|
|
.foregroundStyle(tint)
|
|
.padding(.horizontal, 9)
|
|
.frame(minHeight: 26)
|
|
.background(tint.opacity(0.10))
|
|
.clipShape(Capsule())
|
|
}
|
|
}
|
|
|
|
public struct AIBrandBar: View {
|
|
public init() {}
|
|
|
|
public var body: some View {
|
|
HStack(spacing: 10) {
|
|
Image(systemName: "antenna.radiowaves.left.and.right")
|
|
Text(AppMetadata.name)
|
|
.font(.headline)
|
|
Spacer()
|
|
}
|
|
.foregroundStyle(.white)
|
|
.padding(.horizontal, 16)
|
|
.padding(.vertical, 12)
|
|
.background(Color(red: 0.075, green: 0.118, blue: 0.188))
|
|
}
|
|
}
|