diff LazyBear/Views/Home/Helpers/StockItem.swift @ 441:417148200aaf

Change background color and minor UI updates
author Dennis Concepción Martín <dennisconcepcionmartin@gmail.com>
date Sun, 20 Jun 2021 19:52:21 +0200
parents 4effac4733b0
children
line wrap: on
line diff
--- a/LazyBear/Views/Home/Helpers/StockItem.swift	Sun Jun 20 16:58:36 2021 +0200
+++ b/LazyBear/Views/Home/Helpers/StockItem.swift	Sun Jun 20 19:52:21 2021 +0200
@@ -10,12 +10,16 @@
 
 struct StockItem: View {
     var company: CompanyModel
+    @Environment(\.colorScheme) private var colorScheme
     
     var body: some View {
         RoundedRectangle(cornerRadius: 20)
-            .foregroundColor(Color(.secondarySystemBackground))
+            .foregroundColor(Color("customSecondaryBackground"))
             .aspectRatio(0.8, contentMode: .fit)
             .clipShape(RoundedRectangle(cornerRadius: 20))
+            .if(colorScheme == .light) { content in
+                content.shadow(color: Color(.systemGray).opacity(0.25), radius: 10, x: 0.0, y: 0.0)
+            }
             .overlay(
                 VStack(alignment: .leading) {
                     Group {