Mercurial > public > lazybear
comparison 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 |
comparison
equal
deleted
inserted
replaced
440:01fa77358b82 | 441:417148200aaf |
---|---|
8 import SwiftUI | 8 import SwiftUI |
9 import StockCharts | 9 import StockCharts |
10 | 10 |
11 struct StockItem: View { | 11 struct StockItem: View { |
12 var company: CompanyModel | 12 var company: CompanyModel |
13 @Environment(\.colorScheme) private var colorScheme | |
13 | 14 |
14 var body: some View { | 15 var body: some View { |
15 RoundedRectangle(cornerRadius: 20) | 16 RoundedRectangle(cornerRadius: 20) |
16 .foregroundColor(Color(.secondarySystemBackground)) | 17 .foregroundColor(Color("customSecondaryBackground")) |
17 .aspectRatio(0.8, contentMode: .fit) | 18 .aspectRatio(0.8, contentMode: .fit) |
18 .clipShape(RoundedRectangle(cornerRadius: 20)) | 19 .clipShape(RoundedRectangle(cornerRadius: 20)) |
20 .if(colorScheme == .light) { content in | |
21 content.shadow(color: Color(.systemGray).opacity(0.25), radius: 10, x: 0.0, y: 0.0) | |
22 } | |
19 .overlay( | 23 .overlay( |
20 VStack(alignment: .leading) { | 24 VStack(alignment: .leading) { |
21 Group { | 25 Group { |
22 Text(company.symbol.uppercased()) | 26 Text(company.symbol.uppercased()) |
23 .fontWeight(.semibold) | 27 .fontWeight(.semibold) |