]> git.r.bdr.sh - rbdr/map/blob - Map/Presentation/Base Components/EvolutionPicker.swift
c30798a21934d0b6fa014b2db46b17bf8111d0c8
[rbdr/map] / Map / Presentation / Base Components / EvolutionPicker.swift
1 import SwiftUI
2
3 struct EvolutionPicker: View {
4
5 @Binding var selectedEvolution: StageType
6
7 var body: some View {
8 Picker("Evolution", selection: $selectedEvolution) {
9 ForEach(StageType.types) { stage in
10 Text(Stage.title(stage)).font(.theme.body).tag(stage).padding(4.0)
11 }
12 Divider()
13 ForEach(StageType.characteristics) { stage in
14 Text(Stage.title(stage)).font(.theme.body).tag(stage).padding(4.0).font(.theme.body)
15 }
16 Divider()
17 ForEach(StageType.properties) { stage in
18 Text(Stage.title(stage)).font(.theme.body).tag(stage).padding(4.0)
19 }
20 Divider()
21 ForEach(StageType.custom) { stage in
22 Text(Stage.title(stage)).font(.theme.body).tag(stage).padding(4.0)
23 }
24 }.font(.theme.body).padding(.horizontal, 8.0).padding(.vertical, 4.0)
25 }
26 }
27
28 #Preview {
29 let selectedEvolution: StageType = .behavior
30 EvolutionPicker(selectedEvolution: .constant(selectedEvolution))
31 }