comparison Simoleon/ConversionView.swift @ 183:d2398f02e1ce

implement unit currency selector
author Dennis Concepcion Martin <dennisconcepcionmartin@gmail.com>
date Mon, 20 Dec 2021 12:28:16 +0100
parents
children 2fc95efcb1ee
comparison
equal deleted inserted replaced
182:ba3ebe8cefe5 183:d2398f02e1ce
1 //
2 // ConversionView.swift
3 // Simoleon
4 //
5 // Created by Dennis Concepción Martín on 8/12/21.
6 //
7
8 import SwiftUI
9
10 struct ConversionView: View {
11 var showNavigationView: Bool?
12
13 var body: some View {
14 ScrollView(showsIndicators: false) {
15 VStack(alignment: .leading, spacing: 20) {
16 HStack {
17 CurrencySelector()
18 // FavoriteButton
19 }
20
21 // ConversionBox
22 }
23 .padding()
24 }
25 .navigationTitle("Convert")
26 .if(UIDevice.current.userInterfaceIdiom == .phone && showNavigationView ?? true) { content in
27 NavigationView { content }
28 }
29 }
30 }
31
32 struct ConversionView_Previews: PreviewProvider {
33 static var previews: some View {
34 ConversionView(showNavigationView: true)
35 }
36 }