Files
Reflect/Shared/Views/ImagePickerGridView.swift
Trey t bea2d3bbc9 Update Neon colors and show color circles in theme picker
- Update NeonMoodTint to use synthwave colors matching Neon voting style
  (cyan, lime, yellow, orange, magenta)
- Replace text label with 5 color circles in theme preview Colors row
- Remove unused textColor customization code and picker views
- Add .id(moodTint) to Month/Year views for color refresh
- Clean up various unused color-related code

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 00:08:01 -06:00

56 lines
1.7 KiB
Swift

//
// ImagePickerGrid.swift
// Feels (iOS)
//
// Created by Trey Tartt on 3/12/22.
//
import SwiftUI
struct ImagePickerGridView: View {
@AppStorage(UserDefaultsStore.Keys.theme.rawValue, store: GroupUserDefaults.groupDefaults) private var theme: Theme = .system
@Environment(\.presentationMode) var presentationMode
@State var column = Array(repeating: GridItem(.flexible(), spacing: 10), count: 7)
let pickedImageClosure: ((CustomWidgeImageOptions) -> Void)
private var textColor: Color { theme.currentTheme.labelColor }
let imageOptions = CustomWidgeImageOptions.allCases.sorted(by: {
$0.rawValue < $1.rawValue
})
var body: some View {
VStack {
ScrollView {
LazyVGrid(columns: column,spacing: 10, content: {
ForEach(imageOptions, id:\.self.rawValue) { item in
Image(item.rawValue)
.resizable()
.scaledToFit()
.frame(width: 40, height: 40)
.foregroundColor(textColor)
.onTapGesture {
pickedImageClosure(item)
presentationMode.wrappedValue.dismiss()
}
}
})
}
.padding()
Spacer()
}
.background(
theme.currentTheme.bg
.edgesIgnoringSafeArea(.all)
)
}
}
struct ImagePickerGridView_Previews: PreviewProvider {
static var previews: some View {
ImagePickerGridView(pickedImageClosure: { image in
})
}
}