diff LazyBear/Views/Home/HomeView.swift @ 324:3e64824cca3e

Working on HomeView
author Dennis Concepción Martín <66180929+denniscm190@users.noreply.github.com>
date Mon, 29 Mar 2021 20:59:41 +0200
parents
children 2fabdc393675
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/LazyBear/Views/Home/HomeView.swift	Mon Mar 29 20:59:41 2021 +0200
@@ -0,0 +1,36 @@
+//
+//  HomeView.swift
+//  LazyBear
+//
+//  Created by Dennis Concepción Martín on 28/3/21.
+//
+
+import SwiftUI
+
+struct HomeView: View {
+    
+    var body: some View {
+        NavigationView {
+            List {
+                SectorRow()
+                    .listRowInsets(EdgeInsets())
+                
+                let keyTitles = ["Top gainers", "Top losers", "Most active"]
+                ForEach(keyTitles, id: \.self) { keyTitle in
+                    TopStockRow(keyTitle: keyTitle)
+                    
+                }
+                .listRowInsets(EdgeInsets())
+            }
+            .navigationTitle("Home")
+            .navigationBarTitleDisplayMode(.inline)
+            .navigationViewStyle(StackNavigationViewStyle())
+        }
+    }
+}
+
+struct HomeView_Previews: PreviewProvider {
+    static var previews: some View {
+        HomeView()
+    }
+}