Mercurial > public > lazybear
comparison LazyBear/Views/Global Helpers/StockItem.swift @ 398:933546fa5651
Implementing CompanyView
author | Dennis Concepción Martín <66180929+denniscm190@users.noreply.github.com> |
---|---|
date | Sun, 09 May 2021 00:07:44 +0200 |
parents | bd34e16b01ad |
children | 8357b101df67 |
comparison
equal
deleted
inserted
replaced
397:6f04495c462d | 398:933546fa5651 |
---|---|
59 .font(.callout) | 59 .font(.callout) |
60 .fontWeight(.semibold) | 60 .fontWeight(.semibold) |
61 .opacity(0.6) | 61 .opacity(0.6) |
62 .lineLimit(1) | 62 .lineLimit(1) |
63 | 63 |
64 PriceView(latestPrice: company.latestPrice ?? 0, changePercent: company.changePercent ?? 0, align: .leading) | 64 let priceViewStyle = PriceViewStyle( |
65 alignment: .leading, | |
66 priceFont: .body, | |
67 priceFontWeight: .semibold, | |
68 percentFont: .callout, | |
69 percentFontWeight: .semibold | |
70 ) | |
71 | |
72 PriceView(latestPrice: company.latestPrice ?? 0, | |
73 changePercent: company.changePercent ?? 0, | |
74 style: priceViewStyle) | |
65 .padding(.top) | 75 .padding(.top) |
66 | 76 |
67 } | 77 } |
68 .padding(.horizontal) | 78 .padding(.horizontal) |
69 | 79 |
108 .frame(width: 80) | 118 .frame(width: 80) |
109 .padding(.vertical, 10) | 119 .padding(.vertical, 10) |
110 .padding(.leading) | 120 .padding(.leading) |
111 } | 121 } |
112 | 122 |
113 PriceView(latestPrice: company.latestPrice ?? 0, changePercent: company.changePercent ?? 0, align: .trailing) | 123 let priceViewStyle = PriceViewStyle( |
124 alignment: .leading, | |
125 priceFont: .body, | |
126 priceFontWeight: .semibold, | |
127 percentFont: .callout, | |
128 percentFontWeight: .semibold | |
129 ) | |
130 | |
131 PriceView(latestPrice: company.latestPrice ?? 0, | |
132 changePercent: company.changePercent ?? 0, | |
133 style: priceViewStyle) | |
114 // Center PriceView with the other rows | 134 // Center PriceView with the other rows |
115 .frame(minWidth: 80, alignment: .trailing) | 135 .frame(minWidth: 80, alignment: .trailing) |
116 } | 136 } |
117 } | 137 } |
118 .padding(5) | 138 .padding(5) |