Mercurial > public > lazybear
view LazyBear/Views/Home/Helpers/TradingDatesItem.swift @ 411:681fb377235e
Implementing insider transactions
author | Dennis Concepción Martín <66180929+denniscm190@users.noreply.github.com> |
---|---|
date | Mon, 07 Jun 2021 20:59:52 +0200 |
parents | 09d05e48462f |
children | 2984d8946342 |
line wrap: on
line source
// // TradingDatesItem.swift // LazyBear // // Created by Dennis Concepción Martín on 30/3/21. // import SwiftUI struct TradingDatesItem: View { var date: Date @Environment(\.colorScheme) var colorScheme var body: some View { RoundedRectangle(cornerRadius: 20) .foregroundColor(Color(.secondarySystemBackground)) .frame(width: 100, height: 100) .overlay( VStack { Text(getDateComponents(.month, date)) .fontWeight(.semibold) Text(getDateComponents(.day, date)) .font(.title) .fontWeight(.semibold) .foregroundColor(Color("default")) Text(getDateComponents(.year, date)) .font(.caption) .fontWeight(.semibold) } ) } } struct TradingDatesItem_Previews: PreviewProvider { static var previews: some View { TradingDatesItem(date: Date()) } }