32 lines
1.0 KiB
Swift
32 lines
1.0 KiB
Swift
import SwiftUI
|
|
import Bedrock
|
|
|
|
struct WidgetEmptyStateView: View {
|
|
let title: String
|
|
let subtitle: String
|
|
let symbolName: String
|
|
let timeRange: String
|
|
|
|
var body: some View {
|
|
VStack(spacing: Design.Spacing.small) {
|
|
SymbolIcon(symbolName, size: .hero, color: Color.brandingAccent.opacity(0.6))
|
|
|
|
VStack(spacing: Design.Spacing.xSmall) {
|
|
Text(title)
|
|
.styled(.subheading, emphasis: .custom(.white))
|
|
.multilineTextAlignment(.center)
|
|
|
|
if !timeRange.isEmpty {
|
|
Text(timeRange)
|
|
.styled(.caption, emphasis: .custom(.white.opacity(0.5)))
|
|
}
|
|
}
|
|
|
|
Text(String(localized: "Enjoy this moment."))
|
|
.styled(.caption, emphasis: .custom(.white.opacity(0.5)))
|
|
.multilineTextAlignment(.center)
|
|
}
|
|
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
|
}
|
|
}
|