Version casi lista

This commit is contained in:
alexandrev-tibco
2026-02-17 13:34:02 +01:00
commit e593453abd
99 changed files with 10867 additions and 0 deletions
+45
View File
@@ -0,0 +1,45 @@
import SwiftUI
struct EmptySlotView: View {
let mealType: MealType
let isDropTarget: Bool
let isValidDrop: Bool?
init(mealType: MealType, isDropTarget: Bool = false, isValidDrop: Bool? = nil) {
self.mealType = mealType
self.isDropTarget = isDropTarget
self.isValidDrop = isValidDrop
}
var body: some View {
VStack(spacing: 6) {
Image(systemName: mealType.icon)
.font(.system(size: 20))
.foregroundColor(Color(hex: "#C4C4C4"))
Text(LocalizedStringKey(mealType.rawValue))
.font(.mealMoodCaption)
.foregroundColor(.mealMoodTextSecondary)
}
.frame(maxWidth: .infinity, minHeight: 80)
.background(
RoundedRectangle(cornerRadius: 12)
.fill(Color(hex: "#F9F9F9"))
.overlay(
RoundedRectangle(cornerRadius: 12)
.strokeBorder(
style: StrokeStyle(lineWidth: 2, dash: [5])
)
.foregroundColor(borderColor)
)
)
.animation(.easeInOut(duration: 0.2), value: isDropTarget)
}
private var borderColor: Color {
guard isDropTarget, let valid = isValidDrop else {
return Color(hex: "#E0E0E0")
}
return valid ? .mealMoodSuccess : .mealMoodError
}
}