diff LazyBear/Views/Global Helpers/RowShape.swift @ 413:2984d8946342

Minor UI changes
author Dennis Concepción Martín <66180929+denniscm190@users.noreply.github.com>
date Wed, 09 Jun 2021 10:23:52 +0200
parents fd8df65927e9
children 6dd97877f575
line wrap: on
line diff
--- a/LazyBear/Views/Global Helpers/RowShape.swift	Tue Jun 08 11:46:58 2021 +0200
+++ b/LazyBear/Views/Global Helpers/RowShape.swift	Wed Jun 09 10:23:52 2021 +0200
@@ -8,10 +8,16 @@
 import SwiftUI
 
 struct RowShape: View {
+    @Environment(\.colorScheme) var colorScheme
+    
     var body: some View {
         RoundedRectangle(cornerRadius: 25)
             .foregroundColor(Color("CustomSecondaryBackground"))
-            .shadow(color: Color(.gray).opacity(0.15), radius: 10)
+            .if(colorScheme == .light) { content in
+                // Apply shadow only when is not dark mode
+                content
+                    .shadow(color: Color(.gray).opacity(0.15), radius: 10)
+            }
     }
 }