diff LazyBear/Helpers/SearchRow.swift @ 465:6953d83060a4

New design
author Dennis Concepción Martín <dennisconcepcionmartin@gmail.com>
date Sat, 17 Jul 2021 17:58:57 +0100
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/LazyBear/Helpers/SearchRow.swift	Sat Jul 17 17:58:57 2021 +0100
@@ -0,0 +1,34 @@
+//
+//  SearchRow.swift
+//  lazybear
+//
+//  Created by Dennis Concepción Martín on 17/07/2021.
+//
+
+import SwiftUI
+
+struct SearchRow: View {
+    var company: SearchModel
+    
+    var body: some View {
+        HStack {
+            VStack(alignment: .leading) {
+                Text("\(company.symbol!)")
+                    .font(.headline)
+                
+                Text("\(company.securityName!)")
+                    .font(.subheadline)
+                    .opacity(0.5)
+                    .lineLimit(1)
+            }
+            
+            Spacer()
+        }
+    }
+}
+
+struct SearchRow_Previews: PreviewProvider {
+    static var previews: some View {
+        SearchRow(company: SearchModel(symbol: "AAPL", securityName: "Apple Inc"))
+    }
+}