comparison Simoleon/Helpers/SubscriptionFeature.swift @ 65:4082787b33e5

Minor UI updates
author Dennis Concepción Martín <dennisconcepcionmartin@gmail.com>
date Tue, 27 Jul 2021 22:13:42 +0100
parents b0bce2c8e4a9
children
comparison
equal deleted inserted replaced
64:ad145f9c4153 65:4082787b33e5
6 // 6 //
7 7
8 import SwiftUI 8 import SwiftUI
9 9
10 struct SubscriptionFeature: View { 10 struct SubscriptionFeature: View {
11 var symbol: LocalizedStringKey 11 var symbol: String
12 var colour: Color 12 var colour: Color
13 var title: LocalizedStringKey 13 var title: LocalizedStringKey
14 var description: LocalizedStringKey 14 var description: LocalizedStringKey
15 15
16 var body: some View { 16 var body: some View {
17 HStack(alignment:.top) { 17 HStack(alignment:.top) {
18 Image(systemName: "\(symbol)") 18 Image(systemName: symbol)
19 .foregroundColor(colour) 19 .foregroundColor(colour)
20 .font(.title) 20 .font(.title)
21 21
22 VStack(alignment: .leading) { 22 VStack(alignment: .leading) {
23 Text(title) 23 Text(title)
32 struct SubscriptionFeature_Previews: PreviewProvider { 32 struct SubscriptionFeature_Previews: PreviewProvider {
33 static var previews: some View { 33 static var previews: some View {
34 SubscriptionFeature( 34 SubscriptionFeature(
35 symbol: "star.circle.fill", 35 symbol: "star.circle.fill",
36 colour: Color(.systemYellow), 36 colour: Color(.systemYellow),
37 title: "Favorite currencies", 37 title: "Favorite Currencies",
38 description: "Save your favorite currencies to access them quickly." 38 description: "Save your favorite currencies to access them quickly."
39 ) 39 )
40 } 40 }
41 } 41 }