comparison 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
comparison
equal deleted inserted replaced
397:6f04495c462d 398:933546fa5651
1 //
2 // CompanyHeader.swift
3 // LazyBear
4 //
5 // Created by Dennis Concepción Martín on 8/5/21.
6 //
7
8 import SwiftUI
9
10 struct CompanyHeader: View {
11 var symbol: String
12 @Binding var showViewSelector: Bool
13
14 var body: some View {
15 HStack {
16 Text(symbol.uppercased())
17 .font(.title)
18 .fontWeight(.semibold)
19
20 Spacer()
21
22 Button("Views", action: { showViewSelector = true })
23 }
24 }
25 }
26
27 struct CompanyHeader_Previews: PreviewProvider {
28 static var previews: some View {
29 CompanyHeader(symbol: "AAPL", showViewSelector: .constant(false))
30 }
31 }