Mercurial > public > lazybear
diff LazyBear/Views/Company/Helpers/InsiderRow.swift @ 407:c804ce7a1560
Implementing Insider networking
author | Dennis Concepción Martín <66180929+denniscm190@users.noreply.github.com> |
---|---|
date | Sun, 06 Jun 2021 13:11:41 +0200 |
parents | fd8df65927e9 |
children | 2984d8946342 |
line wrap: on
line diff
--- a/LazyBear/Views/Company/Helpers/InsiderRow.swift Sat Jun 05 19:05:13 2021 +0200 +++ b/LazyBear/Views/Company/Helpers/InsiderRow.swift Sun Jun 06 13:11:41 2021 +0200 @@ -10,19 +10,29 @@ struct InsiderRow: View { var percentageOfWidth: CGFloat + var insiderRoster: InsiderRosterModel var body: some View { RowShape() - .frame(height: 120) + .frame(height: 105) .overlay( VStack(alignment: .leading) { - Text("Dennis Concepcion") - .font(.title3) - .fontWeight(.semibold) + Text(insiderRoster.entityName.capitalized) + .lineLimit(1) + .font(.headline) + + Text("Last updated: \(convertEpoch(insiderRoster.reportDate, false))") + .opacity(0.5) + .font(.subheadline) + + HStack { + Spacer() + Text("\(insiderRoster.position) shares owned") + .font(.caption) + .opacity(0.5) + } - Text("Random guy") CapsuleChartView(percentageOfWidth: percentageOfWidth) - .padding(.top) } .padding() ,alignment: .leading @@ -32,6 +42,14 @@ struct InsiderRow_Previews: PreviewProvider { static var previews: some View { - InsiderRow(percentageOfWidth: 0.6) + InsiderRow( + percentageOfWidth: 0.6, + insiderRoster: + InsiderRosterModel( + entityName: "Dennis Concepcion", + position: 1230, + reportDate: 1234567 + ) + ) } }