comparison Simoleon/Helpers/SubscriptionFeature.swift @ 46:ce4eb7416b41

Add SubscriptionFeatureRow
author Dennis Concepción Martín <dennisconcepcionmartin@gmail.com>
date Mon, 26 Jul 2021 18:25:03 +0100
parents
children b0bce2c8e4a9
comparison
equal deleted inserted replaced
45:1c7687d30373 46:ce4eb7416b41
1 //
2 // SubscriptionFeature.swift
3 // Simoleon
4 //
5 // Created by Dennis Concepción Martín on 26/07/2021.
6 //
7
8 import SwiftUI
9
10 struct SubscriptionFeature: View {
11 var symbol: LocalizedStringKey
12 var colour: Color
13 var title: LocalizedStringKey
14 var description: LocalizedStringKey
15
16 var body: some View {
17 HStack(alignment:.top) {
18 Image(systemName: "\(symbol)")
19 .foregroundColor(colour)
20 .font(.title)
21
22 VStack(alignment: .leading) {
23 Text(title)
24 .font(.headline)
25
26 Text(description)
27 }
28 }
29 }
30 }
31
32 struct SubscriptionFeature_Previews: PreviewProvider {
33 static var previews: some View {
34 SubscriptionFeature(
35 symbol: "star.circle.fill",
36 colour: Color(.systemYellow),
37 title: "Favourite currencies",
38 description: "Save your favourite currencies to access them quickly."
39 )
40 }
41 }