changeset 132:2f579fa8fd19

Add TitleMod and apply it
author Dennis Concepción Martín <66180929+denniscm190@users.noreply.github.com>
date Mon, 08 Feb 2021 18:20:07 +0100
parents 0299ad98b4de
children d3468ac3ecc6
files LazyBear.xcodeproj/project.pbxproj LazyBear.xcodeproj/project.xcworkspace/xcuserdata/dennis.xcuserdatad/UserInterfaceState.xcuserstate lazybear/Views/Stock.swift lazybear/Views/TitleMod.swift lazybear/Views/Transactions.swift
diffstat 5 files changed, 26 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/LazyBear.xcodeproj/project.pbxproj	Mon Feb 08 18:14:04 2021 +0100
+++ b/LazyBear.xcodeproj/project.pbxproj	Mon Feb 08 18:20:07 2021 +0100
@@ -36,6 +36,7 @@
 		95B3552F25CD629F00BCDE8E /* TransactionCodes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95B3552E25CD629F00BCDE8E /* TransactionCodes.swift */; };
 		95B395A525BDF42E009A7EB0 /* companies.json in Resources */ = {isa = PBXBuildFile; fileRef = 95B395A425BDF42E009A7EB0 /* companies.json */; };
 		95D1BF4925ADCF7700E5D063 /* Persistence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95D1BF4825ADCF7700E5D063 /* Persistence.swift */; };
+		95DDC7AB25D1A98A002B2C9A /* TitleMod.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95DDC7AA25D1A98A002B2C9A /* TitleMod.swift */; };
 		95E07B6B25CE9398001718AB /* AppView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95E07B6A25CE9398001718AB /* AppView.swift */; };
 		95E07B6E25CE95A1001718AB /* Search.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95E07B6D25CE95A1001718AB /* Search.swift */; };
 		95E07B7225CE95D9001718AB /* Settings.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95E07B7125CE95D9001718AB /* Settings.swift */; };
@@ -95,6 +96,7 @@
 		95B3552E25CD629F00BCDE8E /* TransactionCodes.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = TransactionCodes.swift; path = lazybear/Data/TransactionCodes.swift; sourceTree = SOURCE_ROOT; };
 		95B395A425BDF42E009A7EB0 /* companies.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = companies.json; path = lazybear/Data/companies.json; sourceTree = SOURCE_ROOT; };
 		95D1BF4825ADCF7700E5D063 /* Persistence.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = Persistence.swift; path = LazyBear/Persistence.swift; sourceTree = SOURCE_ROOT; };
+		95DDC7AA25D1A98A002B2C9A /* TitleMod.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = TitleMod.swift; path = lazybear/Views/TitleMod.swift; sourceTree = SOURCE_ROOT; };
 		95E07B6A25CE9398001718AB /* AppView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AppView.swift; path = lazybear/AppView.swift; sourceTree = SOURCE_ROOT; };
 		95E07B6D25CE95A1001718AB /* Search.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = Search.swift; path = LazyBear/Views/Search.swift; sourceTree = SOURCE_ROOT; };
 		95E07B7125CE95D9001718AB /* Settings.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = Settings.swift; path = LazyBear/Views/Settings.swift; sourceTree = SOURCE_ROOT; };
@@ -182,6 +184,7 @@
 				9598CFE225D06A6C00FA9E1B /* CreateButton.swift */,
 				95F6CA0425CF2A4E0064E4E9 /* ViewSelector.swift */,
 				95E411B525BEE84E00A9C23F /* Stock.swift */,
+				95DDC7AA25D1A98A002B2C9A /* TitleMod.swift */,
 				95F6C30825BAF7C2003CF389 /* Selection.swift */,
 				9520F0B125C712D000692610 /* LineChartShape.swift */,
 				9520F0B425C7131300692610 /* LineChart.swift */,
@@ -356,6 +359,7 @@
 				9520F0B525C7131300692610 /* LineChart.swift in Sources */,
 				9597CE0425C1DFE7004DDFED /* LogoPlaceholder.swift in Sources */,
 				959D28DF25CC9A1A0029F689 /* News.swift in Sources */,
+				95DDC7AB25D1A98A002B2C9A /* TitleMod.swift in Sources */,
 				95E07B9D25CEAC46001718AB /* TransactionDetail.swift in Sources */,
 				95FE646B25C30B880052832E /* ApiModel.swift in Sources */,
 				95B3552F25CD629F00BCDE8E /* TransactionCodes.swift in Sources */,
Binary file LazyBear.xcodeproj/project.xcworkspace/xcuserdata/dennis.xcuserdatad/UserInterfaceState.xcuserstate has changed
--- a/lazybear/Views/Stock.swift	Mon Feb 08 18:14:04 2021 +0100
+++ b/lazybear/Views/Stock.swift	Mon Feb 08 18:20:07 2021 +0100
@@ -27,7 +27,11 @@
     // <--------- API Job --------->
     
     var body: some View {
-        VStack {
+        VStack(alignment: .leading) {
+            Text("Stock")
+                .fontWeight(.semibold)
+                .modifier(TitleMod())
+            
             Divider()
             HStack {
                 Price(symbol: symbol, showHorizontal: true)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lazybear/Views/TitleMod.swift	Mon Feb 08 18:20:07 2021 +0100
@@ -0,0 +1,16 @@
+//
+//  TitleMod.swift
+//  LazyBear
+//
+//  Created by Dennis Concepción Martín on 8/2/21.
+//
+
+import SwiftUI
+
+struct TitleMod: ViewModifier {
+    func body(content: Content) -> some View {
+        content
+            .font(.title)
+            .padding([.leading, .top, .bottom])
+    }
+}
--- a/lazybear/Views/Transactions.swift	Mon Feb 08 18:14:04 2021 +0100
+++ b/lazybear/Views/Transactions.swift	Mon Feb 08 18:20:07 2021 +0100
@@ -21,9 +21,8 @@
     var body: some View {
         VStack(alignment: .leading) {
             Text("Insider transactions")
-                .font(.title)
                 .fontWeight(.semibold)
-                .padding([.leading, .bottom])
+                .modifier(TitleMod())
             
             List {
                 ForEach(data, id: \.self) { data in