main
swift 30 lines 856 Bytes
Raw
1 import SwiftUI
2
3 struct EmptyStateView: View {
4 let title: String
5 let message: String
6 let systemImage: String
7
8 var body: some View {
9 VStack(spacing: 16) {
10 Image(systemName: systemImage)
11 .font(.system(size: 36))
12 .foregroundStyle(KleponColor.accent)
13
14 Text(title)
15 .font(KleponTypography.sectionTitle)
16 .foregroundStyle(KleponColor.textPrimary)
17
18 Text(message)
19 .font(KleponTypography.bodySecondary)
20 .foregroundStyle(KleponColor.textSecondary)
21 .multilineTextAlignment(.center)
22 }
23 .padding(24)
24 .frame(maxWidth: .infinity)
25 .background(
26 RoundedRectangle(cornerRadius: 24, style: .continuous)
27 .fill(KleponColor.surface)
28 )
29 }
30 }