Mercurial > public > lazybear
diff LazyBear/Views/Company/Helpers/CompanyHeader.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 | |
children | 5c99883c7964 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/LazyBear/Views/Company/Helpers/CompanyHeader.swift Sun May 09 00:07:44 2021 +0200 @@ -0,0 +1,31 @@ +// +// CompanyHeader.swift +// LazyBear +// +// Created by Dennis Concepción Martín on 8/5/21. +// + +import SwiftUI + +struct CompanyHeader: View { + var symbol: String + @Binding var showViewSelector: Bool + + var body: some View { + HStack { + Text(symbol.uppercased()) + .font(.title) + .fontWeight(.semibold) + + Spacer() + + Button("Views", action: { showViewSelector = true }) + } + } +} + +struct CompanyHeader_Previews: PreviewProvider { + static var previews: some View { + CompanyHeader(symbol: "AAPL", showViewSelector: .constant(false)) + } +}