Mercurial > public > lazybear
comparison 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 |
comparison
equal
deleted
inserted
replaced
412:a7c9dd0c5822 | 413:2984d8946342 |
---|---|
6 // | 6 // |
7 | 7 |
8 import SwiftUI | 8 import SwiftUI |
9 | 9 |
10 struct RowShape: View { | 10 struct RowShape: View { |
11 @Environment(\.colorScheme) var colorScheme | |
12 | |
11 var body: some View { | 13 var body: some View { |
12 RoundedRectangle(cornerRadius: 25) | 14 RoundedRectangle(cornerRadius: 25) |
13 .foregroundColor(Color("CustomSecondaryBackground")) | 15 .foregroundColor(Color("CustomSecondaryBackground")) |
14 .shadow(color: Color(.gray).opacity(0.15), radius: 10) | 16 .if(colorScheme == .light) { content in |
17 // Apply shadow only when is not dark mode | |
18 content | |
19 .shadow(color: Color(.gray).opacity(0.15), radius: 10) | |
20 } | |
15 } | 21 } |
16 } | 22 } |
17 | 23 |
18 struct RowShape_Previews: PreviewProvider { | 24 struct RowShape_Previews: PreviewProvider { |
19 static var previews: some View { | 25 static var previews: some View { |