comparison LazyBear/Views/Home/Helpers/TradingDatesItem.swift @ 406:09d05e48462f

Change design TradingDateItem
author Dennis Concepción Martín <66180929+denniscm190@users.noreply.github.com>
date Sat, 05 Jun 2021 19:05:13 +0200
parents 31f2838b2de7
children 681fb377235e
comparison
equal deleted inserted replaced
405:fd8df65927e9 406:09d05e48462f
12 @Environment(\.colorScheme) var colorScheme 12 @Environment(\.colorScheme) var colorScheme
13 13
14 var body: some View { 14 var body: some View {
15 RoundedRectangle(cornerRadius: 20) 15 RoundedRectangle(cornerRadius: 20)
16 .foregroundColor(Color(.secondarySystemBackground)) 16 .foregroundColor(Color(.secondarySystemBackground))
17 .frame(height: 100) 17 .frame(width: 100, height: 100)
18 .overlay( 18 .overlay(
19 HStack { 19 VStack {
20 Rectangle() 20 Text(get(.month))
21 .frame(width: 15) 21 .fontWeight(.semibold)
22
23 Text(get(.day))
24 .font(.title)
25 .fontWeight(.semibold)
22 .foregroundColor(Color("default")) 26 .foregroundColor(Color("default"))
23
24 VStack {
25 Text(get(.month))
26 .fontWeight(.semibold)
27
28 Text(get(.day))
29 .font(.title)
30 .fontWeight(.semibold)
31 .foregroundColor(Color("default"))
32
33 Text(get(.year))
34 .font(.caption)
35 .fontWeight(.semibold)
36 }
37 27
38 Spacer() 28 Text(get(.year))
39 VStack { 29 .font(.caption)
40 Text("US Markets are closed") 30 .fontWeight(.semibold)
41 .fontWeight(.semibold)
42 }
43
44 Spacer()
45 } 31 }
46 .clipShape(RoundedRectangle(cornerRadius: 20))
47 ) 32 )
48 } 33 }
49 34
50 private enum Components { 35 private enum Components {
51 case day, month, year 36 case day, month, year