3 struct EvolutionPicker: View {
5 @EnvironmentObject private var store: AppStore
7 private var selectedEvolution: Binding<StageType> {
9 get: { store.state.selectedEvolution },
11 store.send(.selectEvolution(evolution: evolution))
17 Picker("Evolution", selection: selectedEvolution) {
18 ForEach(StageType.types) { stage in
19 Text(Stage.title(stage)).font(.theme.body).tag(stage).padding(4.0)
22 ForEach(StageType.characteristics) { stage in
23 Text(Stage.title(stage)).font(.theme.body).tag(stage).padding(4.0).font(.theme.body)
26 ForEach(StageType.properties) { stage in
27 Text(Stage.title(stage)).font(.theme.body).tag(stage).padding(4.0)
30 ForEach(StageType.custom) { stage in
31 Text(Stage.title(stage)).font(.theme.body).tag(stage).padding(4.0)
33 }.font(.theme.body).padding(.horizontal, 8.0).padding(.vertical, 4.0)
37 struct EvolutionPicker_Previews: PreviewProvider {
38 static var previews: some View {