ChWebsiteApp/CHDataManagement/Views/Settings/SettingsListView.swift
2025-01-29 09:16:29 +01:00

22 lines
633 B
Swift

import SwiftUI
struct SettingsListView: View {
@EnvironmentObject
private var selection: SelectedContent
var body: some View {
List(SettingsSection.allCases) { section in
Label(section.rawValue, systemSymbol: section.icon)
.listRowBackground(RoundedRectangle(cornerRadius: 5)
.fill(selection.section == section ? Color.blue : Color.clear)
.padding(.horizontal, 10)
)
.contentShape(Rectangle())
.onTapGesture {
selection.section = section
}
}
}
}