hololake-system-architecture/product-source/hololake-native-desktop/mobile/ios/Sources/HoloLakeDesign.swift

42 lines
1.4 KiB
Swift

import SwiftUI
enum HoloLakeDesign {
static let deep = Color(red: 0.025, green: 0.045, blue: 0.11)
static let lake = Color(red: 0.08, green: 0.14, blue: 0.32)
static let violet = Color(red: 0.34, green: 0.19, blue: 0.52)
static let pearl = Color(red: 0.95, green: 0.96, blue: 1)
static let muted = Color(red: 0.62, green: 0.66, blue: 0.78)
static let gold = Color(red: 0.96, green: 0.87, blue: 0.62)
static let mint = Color(red: 0.43, green: 0.93, blue: 0.78)
}
struct LakeCard<Content: View>: View {
@ViewBuilder let content: Content
var body: some View {
content
.padding(18)
.frame(maxWidth: .infinity, alignment: .leading)
.background(.white.opacity(0.075), in: RoundedRectangle(cornerRadius: 24))
.overlay {
RoundedRectangle(cornerRadius: 24)
.stroke(.white.opacity(0.14), lineWidth: 1)
}
}
}
struct MetricTile: View {
let label: String
let value: String
var body: some View {
VStack(alignment: .leading, spacing: 6) {
Text(label).font(.caption).foregroundStyle(HoloLakeDesign.muted)
Text(value).font(.title2.weight(.semibold)).foregroundStyle(HoloLakeDesign.pearl)
}
.frame(maxWidth: .infinity, alignment: .leading)
.padding(14)
.background(.white.opacity(0.055), in: RoundedRectangle(cornerRadius: 18))
}
}