diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Simoleon/ConversionView.swift	Mon Dec 20 12:28:16 2021 +0100
@@ -0,0 +1,36 @@
+//
+//  ConversionView.swift
+//  Simoleon
+//
+//  Created by Dennis Concepción Martín on 8/12/21.
+//
+
+import SwiftUI
+
+struct ConversionView: View {
+    var showNavigationView: Bool?
+    
+    var body: some View {
+        ScrollView(showsIndicators: false) {
+            VStack(alignment: .leading, spacing: 20) {
+                HStack {
+                    CurrencySelector()
+                    // FavoriteButton
+                }
+                
+                // ConversionBox
+            }
+            .padding()
+        }
+        .navigationTitle("Convert")
+        .if(UIDevice.current.userInterfaceIdiom == .phone && showNavigationView ?? true) { content in
+            NavigationView { content }
+        }
+    }
+}
+
+struct ConversionView_Previews: PreviewProvider {
+    static var previews: some View {
+        ConversionView(showNavigationView: true)
+    }
+}